mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 09:04:19 +01:00
antithesis-tests: Don't fail tests on ProgrammingError
The ProgrammingError exception is thrown when tables, indexes, or columns are dropped in parallel. Let's not fail the Antithesis test drivers when that happens.
This commit is contained in:
@@ -46,6 +46,10 @@ for i in range(insertions):
|
||||
INSERT INTO tbl_{selected_tbl} ({cols})
|
||||
VALUES ({", ".join(values)})
|
||||
""")
|
||||
except turso.ProgrammingError:
|
||||
# Table/column might have been dropped in parallel - this is expected
|
||||
con.rollback()
|
||||
break
|
||||
except turso.OperationalError as e:
|
||||
if "UNIQUE constraint failed" in str(e):
|
||||
# Ignore UNIQUE constraint violations
|
||||
|
||||
Reference in New Issue
Block a user