davsclaus opened a new pull request, #25630: URL: https://github.com/apache/camel/pull/25630
## Summary - `NatsJetstreamConsumerAckPolicyNoneIT`, `NatsJetstreamConsumerMaxDeliverIT`, and `NatsJetstreamConsumerRedeliveryIT` all used the identical JetStream stream name (`mystream2`), subject (`mytopic2`), and durable consumer name (`camel2`). - `NatsITSupport` doesn't tear down streams/consumers between IT classes, and `NatsConsumer.setupJetStreamConsumer()` never reconciles an already-existing durable consumer's config with a new subscribe request. Whichever of these three tests ran first bound its own `ackPolicy`/`maxDeliver` config to the shared durable consumer server-side; the next test(s) in the suite then silently bound to that stale, mismatched consumer and received zero messages. - This is why `NatsJetstreamConsumerMaxDeliverIT` and `NatsJetstreamConsumerRedeliveryIT` were previously guarded with `@DisabledIfSystemProperty(named = "ci.env.name", ..., "Flaky on GitHub Actions")`. That guard was removed in a prior "fix flaky tests" pass without addressing the underlying collision — most likely because it was verified by running each test class individually rather than as part of the full suite, which is the exact condition that triggers it. - Fix: give each test its own unique stream/subject/durable name (`-ackpolicynone`, `-maxdeliver`, `-redelivery` suffixes), matching the convention already used correctly by the other JetStream IT tests in this package (`-manualack`, `-manualack-nak`, `-pull`, etc). Test-only change, no production code touched. ## Test plan - [x] `mvn verify -Ddevelocity.cache.local.enabled=false` in `components/camel-nats` — all 28 IT tests pass, including the previously-failing two running immediately after `NatsJetstreamConsumerAckPolicyNoneIT` in the same suite (the exact ordering that used to trigger the failure). - [x] Confirmed via minimal repro (`-Dit.test=NatsJetstreamConsumerAckPolicyNoneIT,NatsJetstreamConsumerMaxDeliverIT`) that the failure reproduced before the fix and is gone after. --- _Claude Code on behalf of davsclaus_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
