Skip to content

Conversation

@ishankhemani
Copy link

@ishankhemani ishankhemani commented Jan 8, 2026

fix #13722

Description

AwaitingNonWebApplicationListener should only enter the await state for the
root, non-web ApplicationContext.
When a parent–child context hierarchy is present, the listener must not await
during child context shutdown.

This PR ensures the listener behaves correctly with multiple non-web
application contexts and adds a focused regression test to cover this scenario.

Changes

Prevent awaiting logic from being triggered by child ApplicationContext

Add unit test for non-web parent–child context lifecycle

Testing

Added testMultipleContextNonWebApplication

Tests pass locally

Fixes #13722
please review it sir when you get time @AlbumenJ @RainYuY

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.75%. Comparing base (2daf878) to head (ddec94d).

Files with missing lines Patch % Lines
...ntext/event/AwaitingNonWebApplicationListener.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15981      +/-   ##
============================================
- Coverage     60.72%   58.75%   -1.98%     
+ Complexity    11734       15   -11719     
============================================
  Files          1949     1949              
  Lines         88799    88799              
  Branches      13391    13392       +1     
============================================
- Hits          53922    52172    -1750     
- Misses        29338    30972    +1634     
- Partials       5539     5655     +116     
Flag Coverage Δ
integration-tests-java21 ?
integration-tests-java8 ?
samples-tests-java21 ?
samples-tests-java8 ?
unit-tests-java11 59.00% <0.00%> (+<0.01%) ⬆️
unit-tests-java17 58.48% <0.00%> (-0.03%) ⬇️
unit-tests-java21 58.49% <0.00%> (+<0.01%) ⬆️
unit-tests-java25 58.43% <0.00%> (-0.03%) ⬇️
unit-tests-java8 59.02% <0.00%> (+0.03%) ⬆️

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.

@zrlw zrlw changed the title Fix AwaitingNonWebApplicationListener await with parent context fixes… Fix AwaitingNonWebApplicationListener await with parent context Jan 9, 2026
@zrlw
Copy link
Contributor

zrlw commented Jan 12, 2026

This pr might conflict with current shutdown hook mechanism, many providers of dubbo-sample projects shutdown immediately after launch, pls check Build and Test For PR / Samples Test failure links.

@ishankhemani ishankhemani force-pushed the fix-Await-Parent-ConText branch from 8923fdb to ddec94d Compare January 17, 2026 03:22
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