-
Notifications
You must be signed in to change notification settings - Fork 438
Add missing test object cleanup calls #2734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2734 +/- ##
============================================
- Coverage 51.62% 51.62% -0.01%
+ Complexity 4088 4082 -6
============================================
Files 149 149
Lines 34243 34242 -1
Branches 5719 5719
============================================
- Hits 17679 17677 -2
+ Misses 14103 14091 -12
- Partials 2461 2474 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -89,7 +89,7 @@ public void testISQLServerBulkRecord() throws SQLException { | |||
@Test | |||
public void testBulkCopyDateTimePrecision() throws SQLException { | |||
String dstTable = TestUtils | |||
.escapeSingleQuotes(AbstractSQLGenerator.escapeIdentifier(RandomUtil.getIdentifier("dstTable"))); | |||
.escapeSingleQuotes(AbstractSQLGenerator.escapeIdentifier(RandomUtil.getIdentifier("dstTableBulkCopyDt"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the previous code here was leaving objects in the DB, but the generic name "dstTable" was used elsewhere, making it difficult to quickly identify the offending test.
TestUtils.dropTableIfExists(tableNameJSON, stmt); | ||
TestUtils.dropProcedureIfExists(procedureNameJSON, stmt); | ||
TestUtils.dropUserDefinedTypeIfExists(manyParamUserDefinedType, stmt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tens of thousands of stray types were not getting cleaned up due to this ordering. The type was referenced by the sproc, so the type wouldn't get dropped.
TestUtils.dropTypeIfExists(timestampTVP, stmt); | ||
TestUtils.dropTypeIfExists(dateTVP, stmt); | ||
TestUtils.dropTypeIfExists(timeTVP, stmt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tens of thousands of stray types were not getting cleaned up here...
During review of #2705, I noticed a lot of old test objects in the logs. This PR updates a few tests that weren't cleaning up after themselves appropriately.