diff --git a/analyzer/analyzer/scripts/tests.py b/analyzer/analyzer/scripts/tests.py index c42617c2..955f455b 100644 --- a/analyzer/analyzer/scripts/tests.py +++ b/analyzer/analyzer/scripts/tests.py @@ -550,6 +550,22 @@ def read_holds_dll_constraint_after_sref(connection): lastRow = currentRow return TestSuceeded() +@test +def strict_transaction_order(connection): + """Checks that all transactions are processed in the right order""" + cursor = connection.cursor() + query = """SELECT distinct t2.ID FROM Transactions t1, Transactions t2 where t2.ID > t1.ID and t2.DataStrobeBegin < t1.DataStrobeBegin and t1.DataStrobeBegin != 0 and t2.DataStrobeBegin !=0;""" + + cursor.execute(query) + + transactions = "" + for currentRow in cursor: + transactions += str(currentRow[0]) + "," + + if(transactions != ""): + return TestFailed("Transactions {0} is/are not in Order ".format(transactions)) + return TestSuceeded() + # ----------- powerdown checks --------------------------------------- # @test