Skip to content

[fix][test] Fix flaky GeoReplicationTest.testTopicReplication#26090

Open
void-ptr974 wants to merge 1 commit into
apache:masterfrom
void-ptr974:fix/non-persistent-geo-replication-test
Open

[fix][test] Fix flaky GeoReplicationTest.testTopicReplication#26090
void-ptr974 wants to merge 1 commit into
apache:masterfrom
void-ptr974:fix/non-persistent-geo-replication-test

Conversation

@void-ptr974

Copy link
Copy Markdown
Contributor

Motivation

GeoReplicationTest.testTopicReplication can fail for the non-persistent variant because the test sends messages immediately after creating the producer and consumer. Non-persistent replication can drop messages when the remote replicator producer is not connected yet, so the test can time out waiting for messages on the remote cluster.

Fixes #15913.

Modifications

  • Wait for every partition replicator to the remote cluster to be present and connected before sending messages for the non-persistent variant.
  • Keep the persistent and non-persistent variants in the existing data provider.
  • Use constants for the partition and message counts.
  • Increase the test timeout to account for the explicit replicator readiness wait.

Verification

  • ./gradlew :tests:integration:compileTestJava --max-workers=1
  • ./gradlew :tests:integration:checkstyleTest --max-workers=1

The container integration test was not run locally because the local Docker context is not available to Testcontainers.

@void-ptr974 void-ptr974 changed the title [fix][test] Stabilize non-persistent geo-replication test [fix][test] Fix flaky GeoReplicationTest.testTopicReplication Jun 25, 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.

Flaky-test: GeoReplicationTest.testTopicReplication

1 participant