Skip to content

[Test] Fix asynchronous assertions in pipe integration tests - #18941

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:codex/fix-pipe-attribute-sync-it
Open

Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:codex/fix-pipe-attribute-sync-it

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

IoTDBPipeMetaIT.testAttributeSync checks device attributes immediately after CREATE PIPE, although schema snapshot transfer and device attribute cache updates are asynchronous. An immediate Always assertion can fail on temporarily inconsistent receiver DataNodes (for example, [1, 1, null]). Use assertDataEventuallyOnEnv to wait for the expected merged attributes.

The tree/table lifecycle and protocol tests have seven related assertions with the opposite problem: after stopping a pipe and inserting more sender data, Eventually can pass on the first read of the already established receiver contents, missing later unwanted transfers. Use the existing Always assertions to check that receiver data stays unchanged for the observation period, and replace two fixed five-second sleeps with those checks.

Validation

JDK 17, targeted integration cases:

  • IoTDBPipeMetaIT#testAttributeSync: 1 passed.
  • Tree lifecycle: testLifeCycleLogMode, testLifeCycleFileMode, testLifeCycleHybridMode, and testReceiverAlreadyHaveTimeSeries: 4 passed.
  • Table lifecycle: testReceiverAlreadyHaveTimeSeries: 1 passed.
  • Table protocol: all five 1C1D/3C3D variants calling doTest: 5 passed.
  • Tree protocol: all five 1C1D/3C3D variants calling doTest: 5 passed.

All 16 selected cases passed across runs, with no failures, errors, or skips. The final protocol run completed mvn verify successfully; Spotless, Checkstyle, forbidden API, and license checks passed. The protocol checks use reduced JVM heaps and two visible processors to fit local Windows memory limits.

  • Self-reviewed.

@Caideyipi Caideyipi changed the title [Test] Wait for asynchronous pipe attribute synchronization [Test] Fix asynchronous assertions in pipe integration tests Oct 20, 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.

1 participant