Skip to content

Conversation

@Technoboy-
Copy link
Contributor

Motivation

It fails several times for elapsing over 5s... Maybe we can change the timeout from 5s to 10s.

Error:  Tests run: 9, Failures: 2, Errors: 0, Skipped: 3, Time elapsed: 21.724 s <<< FAILURE! - in org.apache.pulsar.client.impl.MultiTopicsConsumerImplTest
Error:  testParallelSubscribeAsync(org.apache.pulsar.client.impl.MultiTopicsConsumerImplTest)  Time elapsed: 5.05 s  <<< FAILURE!
  org.testng.internal.thread.ThreadTimeoutException: Method org.apache.pulsar.client.impl.MultiTopicsConsumerImplTest.testParallelSubscribeAsync() didn't finish within the time-out 5000
  	at org.testng.internal.MethodInvocationHelper.invokeWithTimeoutWithNewExecutor(MethodInvocationHelper.java:371)
  	at org.testng.internal.MethodInvocationHelper.invokeWithTimeout(MethodInvocationHelper.java:282)
  	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:605)
  	at org.testng.internal.TestInvoker.retryFailed(TestInvoker.java:214)
  	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:58)

https://github.com/apache/pulsar/runs/7875666006?check_suite_focus=true#step:10:3683
https://github.com/apache/pulsar/runs/7875666006?check_suite_focus=true#step:10:3684
https://github.com/apache/pulsar/runs/7875666006?check_suite_focus=true#step:10:3685
https://github.com/apache/pulsar/runs/7875666006?check_suite_focus=true#step:10:3686
https://github.com/apache/pulsar/runs/7875666006?check_suite_focus=true#step:10:3687

Documentation

  • doc-not-needed

@Technoboy- Technoboy- changed the title Fix the flaky test MultiTopicsConsumerImplTest.testParallelSubscribeAsync [fix][tests] Fix the flaky test MultiTopicsConsumerImplTest.testParallelSubscribeAsync Aug 17, 2022
@Technoboy- Technoboy- self-assigned this Aug 17, 2022
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli added this to the 2.11.0 milestone Aug 17, 2022
@eolivelli
Copy link
Contributor

please cherry pick to 2.11 branch

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

This change LGTM,

// Test uses a mocked PulsarClientImpl which will complete the getPartitionedTopicMetadata() internal async call
// after a delay longer than the interval between the two subscribeAsync() calls in the test method body.
//
// Code under tests is using CompletableFutures. Theses may hang indefinitely if code is broken.
// That's why a test timeout is defined.

From the comments here, It looks like the code is broken. I think we have to know why the CompletableFuture is not complete yet.

@Technoboy-
Copy link
Contributor Author

Fixed by #17049
And also cherry-picked to branch-2.11.

@Technoboy- Technoboy- closed this Aug 18, 2022
@Technoboy- Technoboy- deleted the fix-flaky-test-1 branch September 14, 2023 11:33
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