Skip to content

test: keep polling multi-message flow conformance stages until the queue is empty - #729

Open
dgafka wants to merge 1 commit into
mainfrom
dgafka/fix-flaky-round-robin-flow
Open

dgafka wants to merge 1 commit into
mainfrom
dgafka/fix-flaky-round-robin-flow

Conversation

@dgafka

@dgafka dgafka commented Oct 21, 2026

Copy link
Copy Markdown
Member

Why is this change proposed?

Why

Flow conformance stages that consume more than one message now keep polling until their queue is empty, so a slow CI runner no longer fails them.

These stages polled with ExecutionPollingMetadata::createWithTestingSetup(), which stops the consumer after any poll that ends past 100ms. When the first message took longer than that, the consumer stopped before the second message and the expected span tree was missing. This failed Split Testing (8.5) on #727 (job): "dynamic channel sends round robin to its channels" recorded the send to orders_b but no receive under it. The push run on the same commit passed.

Before / after

Stage needs Before After
A second poll, and the first message took over 100ms Consumer stops early; the conformance assertion fails intermittently Consumer polls until the queue is empty
One message only Unchanged Unchanged

Description of Changes

  • Five catalogue stages now poll with createWithFinishWhenNoMessages(): round robin across two channels, two commands on one queue, a handler feeding its own channel, retry then dead letter, and a failing error-channel send.
  • Only test scenarios changed; production code is unchanged.
  • The cause was confirmed by forcing the limit to 1ms across the catalogue: exactly these five stages failed, and every other stage handles one message per poll and still passes.

Pull Request Contribution Terms

  • I have read and agree to the contribution terms outlined in CONTRIBUTING.

…pty, not for 100ms

ExecutionPollingMetadata::createWithTestingSetup() limits a run to 100ms
of wall-clock time, and the consumer stops after any poll that ends past
it. Five catalogue stages need more than one poll in a single run: the
round-robin dynamic channel (orders_a, then orders_b), two commands on
one queue, a handler feeding its own channel, a retry before the dead
letter, and an error channel send that fails on the redelivery. On a
slow runner the first message alone took over 100ms, the run stopped,
and the second message was never received.

These stages now run with createWithFinishWhenNoMessages(), which stops
only once the queue is empty.
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