Flaky-test: DeadLetterTopicTest.testPossibleToDeadLetterEntryIsRemovedWhenRedeliveringABatchMessageId
Search before reporting
- [x] I searched in the issues and found nothing similar.
Example failure
https://github.com/apache/pulsar/actions/runs/40343686774/job/121715823806?pr=27022
Exception stacktrace
Gradle suite > Gradle test > org.apache.pulsar.client.api.DeadLetterTopicTest > testPossibleToDeadLetterEntryIsRemovedWhenRedeliveringABatchMessageId FAILED
java.lang.AssertionError:
Expected size: 1 but was: 0 in:
{}
at org.apache.pulsar.client.api.DeadLetterTopicTest.testPossibleToDeadLetterEntryIsRemovedWhenRedeliveringABatchMessageId(DeadLetterTopicTest.java:1822)
336 tests completed, 1 failed, 161 skipped
> Task :pulsar-broker:test FAILED
BUILD FAILED in 3m 43s
java.lang.AssertionError:
Expected size: 1 but was: 0 in:
{277:0:-1=[org.apache.pulsar.client.impl.MessageImpl@35f0c8be,
org.apache.pulsar.client.impl.MessageImpl@123ae69,
org.apache.pulsar.client.impl.MessageImpl@3990bf84,
org.apache.pulsar.client.impl.MessageImpl@3fd9a536,
org.apache.pulsar.client.impl.MessageImpl@c5f3f4b]}
at org.apache.pulsar.client.api.DeadLetterTopicTest.testPossibleToDeadLetterEntryIsRemovedWhenRedeliveringABatchMessageId(DeadLetterTopicTest.java:1822)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
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:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
PR #26477 The new test has an asynchronous timing state: the in-batch message is first delivered to the internal actuator, and then written to the DLQ candidate table. Therefore, when receive() returns five times, the candidate table may still be empty, resulting in the immediate execution of hasSiz E(1) Occasional failure. It is recommended that the minimum repair only adjust the test: change the assertion to Awaitility.await().untilAsserted(() -> assertThat(consumerImpl.getPossibleSendTo DeadLetterTopicMessages()).hasSize(1)), wait for the candidate registration to be completed before triggering the directional re-drop, and keep the logic of subsequent verification that all messages arrive at DLQ and the candidate table is finally empty.
would like to look into this, could i be assigned?
would like to look into this, could i be assigned?
Of course.
@Denovo1998 kindly check #27152