Changeset: 2776553cb888 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2776553cb888
Modified Files:
sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
Branch: default
Log Message:
Print more info when test fails. Also count distinct on non-key column.
diffs (27 lines):
diff --git
a/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
b/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
--- a/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
+++ b/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
@@ -33,10 +33,21 @@ thread2.start()
thread1.join()
thread2.join()
-cursor1.execute("SELECT COUNT(*), COUNT(DISTINCT k), SUM(k) from T;")
+cursor1.execute("SELECT COUNT(*), COUNT(DISTINCT v), SUM(k) from T;")
res = cursor1.fetchall()
if res != [(MAX_ITERATIONS, MAX_ITERATIONS, EXPECTED_SUM)]:
- sys.stderr.write("[(%d,%d,%d)] expected, [(%d,%d,%d)] received" %
(MAX_ITERATIONS, MAX_ITERATIONS, EXPECTED_SUM, res[0][0], res[0][1], res[0][2]))
+ print("[(%d,%d,%d)] expected, [(%d,%d,%d)] received" % (MAX_ITERATIONS,
MAX_ITERATIONS, EXPECTED_SUM, res[0][0], res[0][1], res[0][2]), file=sys.stderr)
+ cursor1.execute("SELECT * FROM T;")
+ res = cursor1.fetchall()
+ s = set()
+ for t in res:
+ if t[0] in s:
+ print(f"duplicate entry {t}", file=sys.stderr)
+ else:
+ s.add(t[0])
+ for i in range(MAX_ITERATIONS):
+ if i not in s:
+ print(f"entry {i} mssing", file=sys.stderr)
cursor1.close()
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]