Commit 615c7e8
authored
Fix flaky TestInternalMixedCatalogService by hardening test cleanup (#4165)
* Fix flaky TestInternalMixedCatalogService by hardening test cleanup
When a test method fails mid-way after creating a table but before
dropping it, the @AfterEach cleanup could not drop the non-empty
database. This left residual state that caused cascading failures
in subsequent nested test classes (Database already exists, assertion
on listDatabases().isEmpty(), etc.).
- CompatibilityCatalogTests.cleanDatabase: drop residual table before
dropping database, wrap both in try-catch
- TestTableCommit.after: guard dropTable with tableExists check, wrap
in try-catch to prevent cascading cleanup failures
Signed-off-by: Jiwon Park <jpark92@outlook.kr>
* Wrap dropDatabase in try-catch in TestTableOperation cleanup
Add missing try-catch around dropDatabase in TestTableOperation.after()
for consistency with TestTableCommit and CompatibilityCatalogTests
cleanup methods.
Signed-off-by: Jiwon Park <jpark92@outlook.kr>
---------
Signed-off-by: Jiwon Park <jpark92@outlook.kr>1 parent 05ff059 commit 615c7e8
1 file changed
Lines changed: 29 additions & 4 deletions
Lines changed: 29 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
260 | | - | |
261 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
| |||
320 | 334 | | |
321 | 335 | | |
322 | 336 | | |
323 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
324 | 349 | | |
325 | 350 | | |
326 | 351 | | |
| |||
0 commit comments