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

Flaky-test: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic #23416

Open
1 of 2 tasks
lhotari opened this issue Oct 8, 2024 · 2 comments · May be fixed by #23666
Open
1 of 2 tasks

Comments

@lhotari
Copy link
Member

lhotari commented Oct 8, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Example failure

https://github.com/apache/pulsar/actions/runs/11232284277/job/31224135959?pr=23352#step:11:1732

Exception stacktrace

  Error:  Tests run: 50, Failures: 1, Errors: 0, Skipped: 10, Time elapsed: 65.967 s <<< FAILURE! - in org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest
  Error:  org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic[true, true, false](8)  Time elapsed: 10.311 s  <<< FAILURE!
  org.awaitility.core.ConditionTimeoutException: Assertion condition expected [99999] but found [100000] within 10 seconds.
  	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
  	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
  	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
  	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
  	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:769)
  	at org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic(GetPartitionMetadataMultiBrokerTest.java:296)
  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
  	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
  	at org.testng.internal.invokers.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:47)
  	at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:76)
  	at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  	at java.base/java.lang.Thread.run(Thread.java:1583)
  Caused by: java.lang.AssertionError: expected [99999] but found [100000]
  	at org.testng.Assert.fail(Assert.java:110)
  	at org.testng.Assert.failNotEquals(Assert.java:1577)
  	at org.testng.Assert.assertEqualsImpl(Assert.java:149)
  	at org.testng.Assert.assertEquals(Assert.java:131)
  	at org.testng.Assert.assertEquals(Assert.java:1418)
  	at org.testng.Assert.assertEquals(Assert.java:1382)
  	at org.testng.Assert.assertEquals(Assert.java:1428)
  	at org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest.lambda$testCompatibilityDifferentBrokersForNonPersistentTopic$0(GetPartitionMetadataMultiBrokerTest.java:297)
  	at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
  	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
  	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
  	... 4 more

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@pdolif
Copy link
Contributor

pdolif commented Nov 24, 2024

Would it make sense to change the assertion from:

assertEquals(getLookupRequestPermits(), lookupPermitsBefore);

to:

assertEquals(getLookupRequestPermits(), 
    pulsar1.getConfig().getMaxConcurrentLookupRequest() + 
    pulsar2.getConfig().getMaxConcurrentLookupRequest());

Then, we do not interfere with other lookups (for example, those related to the __change_events topic) when setting lookupPermitsBefore = getLookupRequestPermits().

visxu added a commit to vissxu/pulsar that referenced this issue Dec 2, 2024
flaky-test: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic
@visxu
Copy link
Contributor

visxu commented Dec 18, 2024

Hi, @lhotari . Could you help review and approve it when you're available ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment