Skip to content

[Dubbo-Test] Optimize ReconnectTimerTaskTest execution time using Awaitility - #16449

Open
SahajDubey-2005 wants to merge 1 commit into
apache:3.3from
SahajDubey-2005:perf-optimize-reconnect-timer-test
Open

[Dubbo-Test] Optimize ReconnectTimerTaskTest execution time using Awaitility#16449
SahajDubey-2005 wants to merge 1 commit into
apache:3.3from
SahajDubey-2005:perf-optimize-reconnect-timer-test

Conversation

@SahajDubey-2005

Copy link
Copy Markdown

What is the purpose of the change

Optimizes the execution time of ReconnectTimerTaskTest in dubbo-remoting-api.

Brief changelog

  • Reduced tickDuration from 1000ms to 30ms in test setup so that timer ticks are processed much faster.
  • Replaced rigid sleeps/delays with Awaitility using a tight polling interval (10ms) to verify channel reconnection immediately upon trigger.
  • Added awaitility test dependency to dubbo-remoting-api/pom.xml.

Result

  • Test execution time decreased significantly from ~6.0s to ~1.96s (~67% reduction).
  • Verified spotless formatting and local test passes cleanly.

Verifying this change

Run the following Maven command:

./mvnw test -Dtest=ReconnectTimerTaskTest -pl dubbo-remoting/dubbo-remoting-api

@SahajDubey-2005
SahajDubey-2005 force-pushed the perf-optimize-reconnect-timer-test branch from 615d25b to c214d15 Compare September 5, 2026 09:43
@codecov-commenter

codecov-commenter commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.91%. Comparing base (dab47b7) to head (c214d15).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16449      +/-   ##
============================================
- Coverage     60.91%   60.91%   -0.01%     
- Complexity       15    11763   +11748     
============================================
  Files          1953     1953              
  Lines         89271    89271              
  Branches      13473    13473              
============================================
- Hits          54383    54381       -2     
- Misses        29309    29312       +3     
+ Partials       5579     5578       -1     
Flag Coverage Δ
integration-tests-java21 32.13% <ø> (-0.01%) ⬇️
integration-tests-java8 32.15% <ø> (-0.06%) ⬇️
samples-tests-java21 32.16% <ø> (+<0.01%) ⬆️
samples-tests-java8 29.82% <ø> (-0.02%) ⬇️
unit-tests-java11 59.17% <ø> (+<0.01%) ⬆️
unit-tests-java17 58.67% <ø> (+0.01%) ⬆️
unit-tests-java21 58.63% <ø> (-0.02%) ⬇️
unit-tests-java25 58.58% <ø> (-0.03%) ⬇️
unit-tests-java8 59.17% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants