Closed ThugJudy closed 8 months ago
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
Merging #4998 (9205718) into master (5e49df6) will decrease coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #4998 +/- ##
============================================
- Coverage 48.94% 48.94% -0.01%
- Complexity 1781 1783 +2
============================================
Files 348 348
Lines 10991 10991
Branches 1095 1095
============================================
- Hits 5380 5379 -1
- Misses 5281 5284 +3
+ Partials 330 328 -2
Files | Coverage Δ | |
---|---|---|
...gservice/service/AppNamespaceServiceWithCache.java | 81.61% <100.00%> (ø) |
What's the purpose of this PR
fix flaky test com.ctrip.framework.apollo.configservice.service.AppNamespaceServiceWithCacheTest#testAppNamespace
Which issue(s) this PR fixes:
Fixes #4997
Brief changelog
To address this issue effectively, we propose sorting the values in the line 197 of AppNamespaceServiceWithCache to be inserted into the list. List ids = appNamespaceIdCache.keySet().stream().sorted().collect(Collectors.toList());
This approach ensures the stability of the test, by making sure that the list has a maintained order, thereby mitigating any potential flakiness.
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.