aloyszhang opened a new pull request, #18378:
URL: https://github.com/apache/pulsar/pull/18378

   
   ### Motivation
   
   fix flaky test for 
PersistentTopicStreamingDispatcherE2ETest#testMessageRedelivery which failed 
sporadically with the following error 
   ```shell
   Error:  Tests run: 76, Failures: 1, Errors: 0, Skipped: 54, Time elapsed: 
123.672 s <<< FAILURE! - in 
org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest
     Error:  
testMessageRedelivery(org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest)
  Time elapsed: 1.15 s  <<< FAILURE!
     java.lang.AssertionError: msg should be redelivered 
        at org.testng.Assert.fail(Assert.java:87)
        at 
org.apache.pulsar.broker.service.PersistentTopicE2ETest.testMessageRedelivery(PersistentTopicE2ETest.java:1723)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
     Caused by: java.lang.NullPointerException: Cannot invoke 
"org.apache.pulsar.client.api.Message.getValue()" because "redeliveredMsg" is 
null
        at 
org.apache.pulsar.broker.service.PersistentTopicE2ETest.lambda$testMessageRedelivery$7(PersistentTopicE2ETest.java:1721)
        at java.base/java.util.ArrayList.removeIf(ArrayList.java:1672)
        at java.base/java.util.ArrayList.removeIf(ArrayList.java:1660)
        at 
org.apache.pulsar.broker.service.PersistentTopicE2ETest.testMessageRedelivery(PersistentTopicE2ETest.java:1721)
        ... 12 more
   ```
   
   
   ### Modifications
   
   Set the receiveQueue size to make sure `readMoreEntries` can truely read 
more enties when consumer calls `redeliverUnacknowledgedMessages`
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as 
*PersistentTopicStreamingDispatcherE2ETest#testMessageRedelivery*.
   
   ### Documentation
   
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions 
will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since 
the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed 
in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments 
have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to