Skip to content

Flaky-test: ConsumedLedgersTrimTest.testConsumedLedgersTrimNoSubscriptions #10380

Closed

Description

@lhotari

ConsumedLedgersTrimTest is flaky. The testConsumedLedgersTrimNoSubscriptions test method fails sporadically.

example failure

Error:  Tests run: 5, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 23.508 s <<< FAILURE! - in org.apache.pulsar.broker.service.ConsumedLedgersTrimTest
Error:  testConsumedLedgersTrimNoSubscriptions(org.apache.pulsar.broker.service.ConsumedLedgersTrimTest)  Time elapsed: 5.276 s  <<< FAILURE!
java.lang.AssertionError: expected [3:6:-1:0] but found [-1:-1:-1]
	at org.testng.Assert.fail(Assert.java:99)
	at org.testng.Assert.failNotEquals(Assert.java:1037)
	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
	at org.testng.Assert.assertEquals(Assert.java:122)
	at org.testng.Assert.assertEquals(Assert.java:617)
	at org.apache.pulsar.broker.service.ConsumedLedgersTrimTest.testConsumedLedgersTrimNoSubscriptions(ConsumedLedgersTrimTest.java:153)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Activity

  1. lhotari commented on Apr 26, 2021

    @lhotari
    MemberAuthor

    Previous issue about the same test: #9409 . A fix was made in #9420 .

    @315157973 would you mind taking a look at the remaining flakiness in this test?

  2. 315157973 commented on Apr 26, 2021

    @315157973
    Contributor

    I have executed it about 1000 times locally, but it can't be reproduced.

  3. lhotari commented on Apr 26, 2021

    @lhotari
    MemberAuthor

    I have executed it about 1000 times locally, but it can't be reproduced.

    Yes I have noticed the same. Some issues reproduce only when you limit CPU resources. CI runs with 2 cores and it's usually effective to run tests within a docker container with limited resources. Docker can limit resources with --cpus and --cpuset-cpus parameters for docker run. I have shared some scripts that I use for development in https://github.com/lhotari/pulsar-contributor-toolbox#ptbx_until_test_fails_in_docker

  4. codelipenghui commented on Mar 4, 2022

    @codelipenghui
    Contributor

    The issue had no activity for 30 days, mark with Stale label.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions