Skip to content

[Test] Wait for asynchronous table deletion in session IT - #18877

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/session-async-drop-table
Oct 15, 2026
Merged

jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/session-async-drop-table

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

IoTDBSessionRelationalIT.dropTableOfTheSameNameTest assumes that DROP TABLE finishes deletion before returning. With asynchronous deletion, the next query can receive 555: ... pre-delete state instead of the expected 550: Table 'db2.table16' does not exist.

Poll the existing table-not-found assertion with Awaitility for up to 60 seconds, using the session's thread and closing any successful query result while waiting. Check that the same-named table in db1 retains its original data after the db2 table is gone. A deletion that never completes still fails the test.

Validation

  • mvn spotless:apply -pl integration-test -Pwith-integration-tests passed (scoped to the changed file).
  • mvn package -DskipTests -pl integration-test -am -Pwith-integration-tests -Ddevelocity.off=true passed, rebuilding the test nodes and compiling the integration tests. Checkstyle and Spotless passed during the build.
  • mvn failsafe:integration-test@integration-test failsafe:verify@verify -pl integration-test -PTableSimpleIT -Pwith-integration-tests -Dit.test=IoTDBSessionRelationalIT#dropTableOfTheSameNameTest -DfailIfNoTests=true -Ddevelocity.off=true passed: 1 test, 0 failures/errors/skips (1 ConfigNode, 1 DataNode).
  • The same targeted Failsafe command with -PTableClusterIT passed: 1 test, 0 failures/errors/skips (1 ConfigNode, 3 DataNodes).

Local Maven runs used a bounded heap (-Xmx2048m for packaging and -Xmx1024m for Failsafe) and -XX:ActiveProcessorCount=4. The full verify lifecycle was stopped when RAT stalled scanning local Git ignore rules; the package build and targeted Failsafe verification above completed successfully.


This PR has:

  • been self-reviewed.
  • added comments explaining the intent of the code.
  • modified an existing integration test.
  • been tested in a test IoTDB cluster.

Key changed classes
  • IoTDBSessionRelationalIT

@jt2594838
jt2594838 merged commit f106a0f into apache:master Oct 15, 2026
39 checks passed
@jt2594838
jt2594838 deleted the fix/session-async-drop-table branch October 15, 2026 02:37
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