Skip to content

Fix flaky concurrent queue and WAL tests#18246

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-concurrency-test-cleanup
Jul 20, 2026
Merged

Fix flaky concurrent queue and WAL tests#18246
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-concurrency-test-cleanup

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Follow up on the flaky SharedTsBlockQueueTest cleanup by fixing similar concurrency-test issues:

  • replace an unbounded non-daemon polling thread in ConcurrentIterableLinkedQueueTest with a bounded executor task
  • replace fixed sleeps with latches that establish worker startup
  • retain submitted futures and propagate worker failures to the test thread
  • shut down every local executor in finally
  • replace preemptive JUnit timeouts in the WAL tests with bounded future waits that can clean up their workers

This prevents background threads from leaking into later tests and makes failures report their underlying worker exception instead of timing out.

Testing

  • mvn -o -nsu -Ddevelocity.off=true test -pl iotdb-core/node-commons -Dtest=ConcurrentIterableLinkedQueueTest -DfailIfNoTests=false: 24 tests passed
  • repeated ConcurrentIterableLinkedQueueTest 20 times: 20/20 passed
  • compiled and ran WALNodeWaitForRollFileTest directly: 7 tests passed, including the 30-second auto-roll path
  • mvn -o -nsu -Ddevelocity.off=true spotless:check -pl iotdb-core/node-commons,iotdb-core/datanode
  • mvn -o -nsu -Ddevelocity.off=true checkstyle:check -pl iotdb-core/node-commons,iotdb-core/datanode

The full DataNode reactor remains blocked before the test phase by the existing generated Thrift javax.annotation compilation issue noted in #18244.

@jt2594838
jt2594838 merged commit 8e5e850 into apache:master Jul 20, 2026
40 of 41 checks passed
@jt2594838
jt2594838 deleted the fix-concurrency-test-cleanup branch July 20, 2026 08:35
jt2594838 pushed a commit that referenced this pull request Jul 21, 2026
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