Skip to content

Conversation

@Shawyeok
Copy link
Contributor

@Shawyeok Shawyeok commented Sep 20, 2025

Fixes #24765

Motivation

Revise BrokerServiceTest.testShutDownWithMaxConcurrentUnload, since #24731 fixed the issue where the broker couldn’t be shut down via pulsar admin. The original test contains a race condition in its assertion.

admin.brokers().shutDownBrokerGracefully(1, false);
Awaitility.await().atLeast(bundleNum - 1, TimeUnit.SECONDS).untilAsserted(() -> {
    assertEquals(pulsar.getBrokerService().getTopics().size(), 0);  // race condition: pulsar.getBrokerService() is possibly be null because the broker is shutting down
});

Verifying this change

  • Make sure that the change passes the CI checks.

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:

…ntUnload

Revise `BrokerServiceTest.testShutDownWithMaxConcurrentUnload`, since apache#24731 fixed the issue where the broker couldn’t be shut down via Pulsar Admin. The original test contains a race condition in its assertion.
```java
admin.brokers().shutDownBrokerGracefully(1, false);
Awaitility.await().atLeast(bundleNum - 1, TimeUnit.SECONDS).untilAsserted(() -> {
    assertEquals(pulsar.getBrokerService().getTopics().size(), 0);  // race condition: pulsar.getBrokerService() is possibly be null because the broker is shutting down
});
```
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 20, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.27%. Comparing base (d833b8b) to head (605a1bb).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24769      +/-   ##
============================================
+ Coverage     74.10%   74.27%   +0.16%     
- Complexity    33607    33640      +33     
============================================
  Files          1901     1901              
  Lines        148403   148403              
  Branches      17204    17204              
============================================
+ Hits         109972   110219     +247     
+ Misses        29646    29390     -256     
- Partials       8785     8794       +9     
Flag Coverage Δ
inttests 26.49% <ø> (?)
systests 22.73% <ø> (-0.03%) ⬇️
unittests 73.77% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 94 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Technoboy- Technoboy- merged commit 0c6ba1c into apache:master Sep 20, 2025
55 of 56 checks passed
lhotari pushed a commit that referenced this pull request Sep 22, 2025
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
lhotari pushed a commit that referenced this pull request Sep 23, 2025
lhotari pushed a commit that referenced this pull request Sep 23, 2025
lhotari pushed a commit that referenced this pull request Sep 23, 2025
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 26, 2025
…ntUnload (apache#24769)

(cherry picked from commit 0c6ba1c)
(cherry picked from commit 2d68d84)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 26, 2025
…ntUnload (apache#24769)

(cherry picked from commit 0c6ba1c)
(cherry picked from commit 2d68d84)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 29, 2025
…ntUnload (apache#24769)

(cherry picked from commit 0c6ba1c)
(cherry picked from commit b4ba39c)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 29, 2025
…ntUnload (apache#24769)

(cherry picked from commit 0c6ba1c)
(cherry picked from commit b4ba39c)
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: BrokerServiceTest.testShutDownWithMaxConcurrentUnload

4 participants