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

[fix][test] fix flaky test shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi #22249

Conversation

liangyepianzhou
Copy link
Contributor

@liangyepianzhou liangyepianzhou commented Mar 12, 2024

Fixes #22239

Motivation

The test shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi failed too many times in the GitHub CI because of too many topics and too little runtime.
https://github.com/apache/pulsar/actions/runs/8245776074/job/22550815658?pr=22034
https://github.com/apache/pulsar/actions/runs/8234998047/job/22547427391?pr=22243

org.apache.pulsar.broker.loadbalance.AdvertisedListenersMultiBrokerLeaderElectionTest.shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi  Time elapsed: 60.005 s  <<< FAILURE!
  org.testng.internal.thread.ThreadTimeoutException: Method org.apache.pulsar.broker.loadbalance.MultiBrokerLeaderElectionTest.shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi() didn't finish within the time-out 60000
  	at java.base@17.0.10/jdk.internal.misc.Unsafe.park(Native Method)
  	at java.base@17.0.10/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
  	at java.base@17.0.10/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:447)
  	at java.base@17.0.10/java.util.concurrent.FutureTask.get(FutureTask.java:190)
  	at 

Modifications

Increase the runtime of the shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 12, 2024
@lhotari
Copy link
Member

lhotari commented Mar 12, 2024

btw. there's issue #22239 for tracking this.

The test shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi failed too many times in the GitHub CI because of too many topics and too little runtime.

That's true, but why is it so slow is something to address. I've already investigated this and Mockito seems to be part of the story.

@lhotari
Copy link
Member

lhotari commented Mar 12, 2024

I'm wondering if it's the switch to Corretto in CI (#22238) which is making things more flaky. It could also be a real production code issue. We can merge this in the meantime.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.59%. Comparing base (bbc6224) to head (af9e59f).
Report is 40 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22249      +/-   ##
============================================
+ Coverage     73.57%   73.59%   +0.02%     
- Complexity    32624    32738     +114     
============================================
  Files          1877     1879       +2     
  Lines        139502   139791     +289     
  Branches      15299    15335      +36     
============================================
+ Hits         102638   102883     +245     
- Misses        28908    28912       +4     
- Partials       7956     7996      +40     
Flag Coverage Δ
inttests 26.80% <ø> (+2.22%) ⬆️
systests 24.39% <ø> (+0.07%) ⬆️
unittests 72.86% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 94 files with indirect coverage changes

@lhotari lhotari merged commit d15e87d into apache:master Mar 12, 2024
75 of 77 checks passed
@liangyepianzhou liangyepianzhou deleted the flaky/shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi branch March 13, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
3 participants