Skip to content

fix(tests): stabilize TQEClusterIntegrationTest against queue dedup#104

Draft
dkasimovskiy wants to merge 2 commits into
masterfrom
fix/tqe-integration-flaky-test
Draft

fix(tests): stabilize TQEClusterIntegrationTest against queue dedup#104
dkasimovskiy wants to merge 2 commits into
masterfrom
fix/tqe-integration-flaky-test

Conversation

@dkasimovskiy

@dkasimovskiy dkasimovskiy commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • TQEClusterIntegrationTest.testPublishAndConsumeData (both TQE 2.x and 3.x parameters) intermittently timed out at 60s waiting for the consumer to receive 100 messages.
  • Root cause: the queue config sets deduplication_mode: keep_latest, so duplicate (age, name) payloads collapse on the broker. The previous Instancio generator (allowEmpty().nullable() names, full int range ages) periodically produced collisions (~1 in 30 runs locally), leaving the consumer unable to ever reach 100 messages.
  • Fix: generate strictly-unique deterministic User(i, "user-"+i) so dedup is a no-op. Also subscribe before publishing so the consumer stream is active when messages are produced.

I haven't forgotten about:

  • Tests
  • Changelog
  • Documentation
    • JavaDoc was written
  • Commit messages comply with the guideline
  • Cleanup the code for review. See checklist

🤖 Generated with Claude Code

dkasimovskiy and others added 2 commits June 26, 2026 14:12
The TQE queue config (both 2.x and 3.x) sets deduplication_mode:
keep_latest, so duplicate (age, name) payloads collapse on the broker.
The previous Instancio generator with allowEmpty().nullable() names
periodically produced collisions (1 in ~30 runs), leaving the consumer
unable to ever receive USERS_COUNT messages and timing out at 60s.

Generate strictly-unique deterministic users so dedup is a no-op.
Also subscribe before publishing so the consumer stream is active when
messages are produced, avoiding reliance on cursor="" replay while the
broker is settling.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
subscribe() returns void immediately after kicking off the async stream,
so retryUntilSuccess cannot retry a failure — the wrapper is dead weight.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dkasimovskiy dkasimovskiy force-pushed the fix/tqe-integration-flaky-test branch from 5980ade to 8b3a02d Compare June 26, 2026 11:12
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