Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TestUtil.dropXyz(...) object not exists errors (#1359)
* test: Change drop object utilities in TestUtils to use IF EXISTS Changes most drop object helper methods in TestUtils to check if a transaction is in progress and, if not, then use IF EXISTS to suppress errors for missing objects during the DROP command. If a transaction is in progress then the command then the drop is executed without the IF EXISTS clause so that missing objects results in an exception and test failure. In either case an unrelated error such as the server being offline will be now throw an exception. This is a change from the prior behavior where all errors that are not part of a transaction were being suppressed. errors if the object being dropped does not exist. * test: Change TestUtil.dropSequence(...) to add CASCADE Adds CASCADE option to TestUtils.dropSequence(...) helper to handle dependency errors in drop statements that previously being ignored. * test: Add shouldDrop param to TestUtils.createCompositeType(...) Also adds a method matching the previous signature without the new parameter and defaulting to the older behaviour of true (i.e. drop then create). * test: Use explicit drop type statements for metadata tests Adds explicit drop statements for types in metadata tests to ensure the drop statements are executed in the correct order. Also adds a drop statement for the reference table. The revised drop order is required as TestUtils no longer skips over non-missing object errors when dropping objects. * test: Clean up throws clauses in TestUtil Restricts throws clauses in TestUtil to SQLException rather than a more broad Exception and removes throws clause from initDriver().
- Loading branch information
Showing with 65 additions and 48 deletions.