Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test testConsumeFromMultipleTopics #838

Merged
merged 9 commits into from
Jun 18, 2021

Conversation

vmaheshw
Copy link
Collaborator

Gradle suite > Gradle test > com.linkedin.datastream.connectors.kafka.mirrormaker.TestKafkaMirrorMakerConnectorTask.testConsumeFromMultipleTopics FAILED java.lang.AssertionError: Metric KafkaMirrorMakerConnector.cff18360-e356-48eb-89e0-aa1d07d125d4.numPartitionFetchErrors must match exactly one BrooklinMetricInfo but it matched 0 expected [1] but found [0] at org.testng.Assert.fail(Assert.java:97) at org.testng.Assert.assertEqualsImpl(Assert.java:136) at org.testng.Assert.assertEquals(Assert.java:118) at org.testng.Assert.assertEquals(Assert.java:839) at com.linkedin.datastream.testutil.MetricsTestUtils.verifyMetrics(MetricsTestUtils.java:100) at com.linkedin.datastream.testutil.MetricsTestUtils.verifyMetrics(MetricsTestUtils.java:56) at com.linkedin.datastream.connectors.kafka.mirrormaker.TestKafkaMirrorMakerConnectorTask.testConsumeFromMultipleTopics(TestKafkaMirrorMakerConnectorTask.java:144)

This test failing because of another test in AbstractKafkaConnector running at the same time hits "Error in PartitionDiscoveryThread` which results in additional metric registration. In the flaky test, the filter is missing and it finds additional metric and fails.

To fix this, adding the connector filter to only check for relevant metrics.

Copy link
Collaborator

@jzakaryan jzakaryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vmaheshw vmaheshw merged commit d3f3d42 into linkedin:master Jun 18, 2021
@vmaheshw vmaheshw deleted the fixFlakyTest branch June 18, 2021 22:55
vmaheshw added a commit to vmaheshw/brooklin that referenced this pull request Mar 1, 2022
Fix flaky test testConsumeFromMultipleTopics
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.

3 participants