Skip to content

[Bug][Spring Boot] Fix AwaitingNonWebApplicationListener await() with parent context#15890

Closed
ishankhemani wants to merge 0 commit into
apache:3.3from
ishankhemani:fix-awaitingnonweb-listener
Closed

[Bug][Spring Boot] Fix AwaitingNonWebApplicationListener await() with parent context#15890
ishankhemani wants to merge 0 commit into
apache:3.3from
ishankhemani:fix-awaitingnonweb-listener

Conversation

@ishankhemani
Copy link
Copy Markdown

@ishankhemani ishankhemani commented Dec 21, 2025

Changes made:

AwaitingNonWebApplicationListener.java

Updated await() logic to correctly handle parent contexts.

Ensures that await() completes even if the application context is not a root context.

AwaitingNonWebApplicationListenerTest.java

Rewrote the test to simulate a parent-child application context scenario.

Added an assertion to verify that await() completes successfully with a parent context.

pom.xml (dubbo-spring-boot)

Updated Maven Surefire plugin configuration to ensure JUnit Jupiter tests are executed properly.

Why this is important:

Fixes a blocking issue in non-web Spring Boot applications using Dubbo with a bootstrap parent context.

Improves test coverage to catch similar issues in the future.

Ensures consistent behavior of Dubbo application lifecycle handling.

Testing done:

Verified that AwaitingNonWebApplicationListenerTest passes locally with the updated logic.

Build succeeds with all existing tests.
Fixes #13722
please review this pr when you get time respected sir @RainYuY @AlbumenJ @AlexStocks

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.74%. Comparing base (47a141c) to head (44e87ee).

Files with missing lines Patch % Lines
...ntext/event/AwaitingNonWebApplicationListener.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15890      +/-   ##
============================================
- Coverage     60.75%   60.74%   -0.01%     
- Complexity    11703    11705       +2     
============================================
  Files          1938     1938              
  Lines         88694    88697       +3     
  Branches      13387    13388       +1     
============================================
- Hits          53886    53879       -7     
- Misses        29275    29287      +12     
+ Partials       5533     5531       -2     
Flag Coverage Δ
integration-tests-java21 32.37% <0.00%> (+0.04%) ⬆️
integration-tests-java8 32.44% <0.00%> (-0.09%) ⬇️
samples-tests-java21 32.08% <50.00%> (-0.03%) ⬇️
samples-tests-java8 29.72% <50.00%> (+0.10%) ⬆️
unit-tests-java11 59.05% <0.00%> (+<0.01%) ⬆️
unit-tests-java17 58.51% <0.00%> (-0.03%) ⬇️
unit-tests-java21 58.53% <0.00%> (-0.02%) ⬇️
unit-tests-java25 58.49% <0.00%> (-0.01%) ⬇️
unit-tests-java8 59.04% <0.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@ishankhemani
Copy link
Copy Markdown
Author

’ve pushed an update to address the failing test.

The test has been simplified and corrected to properly validate AwaitingNonWebApplicationListener behavior with a parent context.

All tests pass locally now. Please let me know if any further adjustments are needed.

@ishankhemani
Copy link
Copy Markdown
Author

PLEASE REVIEW IT SIR WHEN YOU GET TIME @RainYuY @AlbumenJ

@RainYuY
Copy link
Copy Markdown
Member

RainYuY commented Jan 5, 2026

Looks like this PR was coded by AI. I don’t understand why there are so many meaningless changes.

Copy link
Copy Markdown
Member

@RainYuY RainYuY left a comment

Choose a reason for hiding this comment

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

Looks like this PR was coded by AI. I don’t understand why there are so many meaningless changes.

@ishankhemani ishankhemani force-pushed the fix-awaitingnonweb-listener branch from 44e87ee to 703290d Compare January 5, 2026 06:47
@ishankhemani ishankhemani deleted the fix-awaitingnonweb-listener branch January 5, 2026 06:53
@ishankhemani ishankhemani restored the fix-awaitingnonweb-listener branch January 5, 2026 06:54
ishankhemani added a commit to ishankhemani/dubbo that referenced this pull request Jan 5, 2026
ishankhemani added a commit to ishankhemani/dubbo that referenced this pull request Jan 5, 2026
ishankhemani added a commit to ishankhemani/dubbo that referenced this pull request Jan 5, 2026
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.

AwaitingNonWebApplicationListener bug

3 participants