If tests/shared/dml/SelectTests/testInList08() is run locally on all containers together via gradle task test, this results in false exceptions from certain databases: MySQL, PostgreSQL, MariaDB. The same exceptions are shown if the entire SelectTests suite is run with one of those databases:
java.sql.BatchUpdateException: Duplicate entry 'Board1' for key 'board_name_unique'
This occurs because that test uses 2 table resources without closing them at the end (usually handled via withTables).
This can be confirmed by adding println(SchemaUtils.listTables()) to any unrelated unit test in the class and running all tests in the class. The 2 tables not included in withTables will be logged as open and active in the database.
Presumably this does not lead to failing CI because each container opens, runs tests, and closes separately 🤔
Other unit tests that don't drop tables at the end were found and edited, either by calling SchemaUtils.drop() directly or including the table in withX().
Aditional:
Remove some unused parameters and imports
Remove left-in println() that don't have commented use
If
tests/shared/dml/SelectTests/testInList08()
is run locally on all containers together via gradle tasktest
, this results in false exceptions from certain databases: MySQL, PostgreSQL, MariaDB. The same exceptions are shown if the entireSelectTests
suite is run with one of those databases:This occurs because that test uses 2 table resources without closing them at the end (usually handled via
withTables
). This can be confirmed by addingprintln(SchemaUtils.listTables())
to any unrelated unit test in the class and running all tests in the class. The 2 tables not included inwithTables
will be logged as open and active in the database.Presumably this does not lead to failing CI because each container opens, runs tests, and closes separately 🤔
Other unit tests that don't drop tables at the end were found and edited, either by calling
SchemaUtils.drop()
directly or including the table inwithX()
.Aditional:
println()
that don't have commented use