Skip to content

[Test] Fix relational session cleanup and invalid timestamp test setup - #18887

Merged
jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:fix-session-relational-teardown-retry-304
Oct 16, 2026
Merged

jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:fix-session-relational-teardown-retry-304

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Description

IoTDBSessionRelationalIT.tearDown() can fail with status 304 when an asynchronous DROP TABLE procedure is still finishing as cleanup drops its database. For example, insertAllNullSqlTest drops db1.all_null immediately before database cleanup.

Retry each database drop for up to 60 seconds when the server returns OVERLAP_WITH_EXISTING_TASK, using the existing table session and Awaitility on the same thread. Other statement errors and connection errors propagate immediately.

insertWrongTimeSqlTest also used a table containing only TAG and ATTRIBUTE columns. Add a FIELD column and a valid field value to each insert so the test isolates timestamp validation. Keep the existing 701 assertions for invalid date strings, arithmetic expressions, floating-point values, and boolean values.

Validation

  • Integration-test compilation, Checkstyle, and Spotless passed.

  • DataNode compilation and packaging passed.

  • Focused TableSimpleIT run covering invalid timestamps, missing FIELD columns, and cleanup after table deletion: 6 tests passed; Failsafe verification passed.

  • Local fault injection against the actual tearDown() method: normal cleanup and repeated 304 responses on all three databases completed successfully; unexpected statement errors and connection errors propagated immediately, with the session closed in every case.

  • Full IoTDBSessionRelationalIT run on TableSimpleIT, using the DataNode rebuilt from this checkout: 29 tests passed, 0 failures, 0 errors, 0 skipped, with no cleanup errors; Failsafe verification passed.

  • Self-reviewed.

  • Tested in a 1 ConfigNode / 1 DataNode cluster.

@Caideyipi Caideyipi changed the title [Test] Retry session database cleanup after asynchronous table deletion [Test] Fix relational session cleanup and invalid timestamp test setup Oct 15, 2026
@jt2594838
jt2594838 merged commit 330b0c7 into apache:master Oct 16, 2026
36 of 39 checks passed
@jt2594838
jt2594838 deleted the fix-session-relational-teardown-retry-304 branch October 16, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants