Skip to content

Conversation

@Anshul-creator
Copy link
Contributor

What is the purpose of the change?

This PR stabilizes "map argument body test" and "advance bean argument get test" inside RestProtocolTest.groovy that were exhibiting order-dependent flakiness when asserting on map and nested-bean argument serialization output. These tests failed intermittently under randomized execution orders, JVM differences, and NonDex mutated iteration orders.

Root Cause

These test assertions depended on strict substring matching of complete JSON fragments, assuming a fixed deterministic field order during serialization. However, JSON object key ordering is not guaranteed, and the internal map/bean population logic may result in different field iteration orders. This caused nondeterministic failures.

Changes Made

  • Updated "map argument body test" to assert key/value presence independently rather than asserting on a single ordered JSON substring.
  • Updated selected rows of "advance bean argument get test" to use order-insensitive fragment assertions for map and nested-map responses.
  • Retained existing test signatures, input parameters, and expected logical outcomes.

Verification

You can try running the following snippet of code from the dubbo repo root, on both pre-fix and post-fix code

./mvnw -q -pl dubbo-rpc/dubbo-rpc-triple edu.illinois:nondex-maven-plugin:2.2.1:nondex \
  -DnondexRuns=50 \
  -Dtest=org.apache.dubbo.rpc.protocol.tri.rest.support.basic.RestProtocolTest

The tests should fail intermittently on the pre-fix version, but pass consistently across all seeds on the post-fix version.
NonDex run logs will be available under the dubbo-rpc/dubbo-rpc-triple/.nondex directory.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.76%. Comparing base (58d7386) to head (a39fc15).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15777      +/-   ##
============================================
- Coverage     60.77%   60.76%   -0.02%     
+ Complexity    11706    11698       -8     
============================================
  Files          1938     1938              
  Lines         88646    88646              
  Branches      13379    13379              
============================================
- Hits          53875    53866       -9     
- Misses        29249    29260      +11     
+ Partials       5522     5520       -2     
Flag Coverage Δ
integration-tests-java21 32.38% <ø> (+0.01%) ⬆️
integration-tests-java8 32.45% <ø> (+<0.01%) ⬆️
samples-tests-java21 31.95% <ø> (-0.03%) ⬇️
samples-tests-java8 29.74% <ø> (+0.01%) ⬆️
unit-tests-java11 59.09% <ø> (-0.01%) ⬇️
unit-tests-java17 58.54% <ø> (-0.02%) ⬇️
unit-tests-java21 58.54% <ø> (+0.01%) ⬆️
unit-tests-java25 58.51% <ø> (+0.01%) ⬆️
unit-tests-java8 59.07% <ø> (-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.

Copy link
Contributor

@zrlw zrlw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

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

LGTM

@RainYuY RainYuY merged commit 3570ee0 into apache:3.3 Nov 21, 2025
33 checks passed
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.

4 participants