Skip to content

[Test] Fix flaky heartbeat executor bound test - #18773

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/flaky-subscription-heartbeat-test
Sep 30, 2026
Merged

jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix/flaky-subscription-heartbeat-test

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

testHeartbeatExecutorIsBounded assumed the shared heartbeat executor had its full capacity available to the test. Concurrent heartbeat tasks can consume a slot, causing submitProviderHeartbeat to return null before the test finishes filling the executor. The cleanup loop then dereferences that null future.

Submit blocking tasks until the executor rejects one, retain only accepted futures, and verify rejection occurs within the configured thread and queue capacity.

Tests

  • mvn spotless:apply -pl iotdb-client/subscription
  • mvn -pl iotdb-client/subscription -Dtest=SubscriptionConsumerHeartbeatIsolationTest test

@jt2594838
jt2594838 merged commit 50d86cf into apache:master Sep 30, 2026
39 checks passed
@jt2594838
jt2594838 deleted the fix/flaky-subscription-heartbeat-test branch September 30, 2026 01:39
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