[MINOR] fix(test): fix flaky test ServletTest.testUnhealthyNodesServlet by xianjingfeng · Pull Request #1952 · apache/uniffle · GitHub
Skip to content

[MINOR] fix(test): fix flaky test ServletTest.testUnhealthyNodesServlet#1952

Merged
xianjingfeng merged 3 commits into
apache:masterfrom
xianjingfeng:minor
Jul 26, 2024
Merged

[MINOR] fix(test): fix flaky test ServletTest.testUnhealthyNodesServlet#1952
xianjingfeng merged 3 commits into
apache:masterfrom
xianjingfeng:minor

Conversation

@xianjingfeng

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Fix flaky test ServletTest.testUnhealthyNodesServlet.

Why are the changes needed?

In the original logic, shuffleIds will have three elements when only one unhealthy node is obtained for the first time.
https://github.com/apache/incubator-uniffle/actions/runs/10086923444/job/27890257649?pr=1948

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI

@xianjingfeng

Copy link
Copy Markdown
Member Author

@xianjingfeng xianjingfeng requested a review from advancedxy July 25, 2024 03:03
@github-actions

github-actions Bot commented Jul 25, 2024

Copy link
Copy Markdown

Test Results

 2 732 files  +1   2 732 suites  +1   5h 37m 33s ⏱️ -47s
   969 tests ±0     968 ✅ +1   1 💤 ±0  0 ❌  - 1 
12 144 runs  +1  12 129 ✅ +2  15 💤 ±0  0 ❌  - 1 

Results for commit e47b6be. ± Comparison against base commit 5ddcc28.

♻️ This comment has been updated with latest results.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.51%. Comparing base (5ddcc28) to head (fb30d71).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1952      +/-   ##
============================================
- Coverage     52.77%   52.51%   -0.26%     
- Complexity     2498     2551      +53     
============================================
  Files           398      411      +13     
  Lines         18135    18771     +636     
  Branches       1660     1705      +45     
============================================
+ Hits           9570     9857     +287     
- Misses         7981     8297     +316     
- Partials        584      617      +33     

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

@yl09099

yl09099 commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

@yl09099 cc

Why are there three elements?

shuffleServer3.markUnhealthy();
shuffleServer4.markUnhealthy();
List<String> expectShuffleIds = Arrays.asList(shuffleServer3.getId(), shuffleServer4.getId());
List<String> shuffleIds = new ArrayList<>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm.

I think you should move this initialization to the until lambda in Awaitility.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@xianjingfeng

Copy link
Copy Markdown
Member Author

@yl09099 cc

Why are there three elements?

When the shuffle server becomes unhealthy, we need to wait for it to report its status to the coordinator before we can get its status from the coordinator. So sometimes only one unhealthy node will be obtained for the first time.

@rickyma rickyma added the flaky test a flaky test label Jul 25, 2024
@xianjingfeng xianjingfeng merged commit 6952210 into apache:master Jul 26, 2024
@xianjingfeng

xianjingfeng commented Jul 26, 2024

Copy link
Copy Markdown
Member Author

@xianjingfeng xianjingfeng deleted the minor branch July 26, 2024 03:17
maobaolong pushed a commit to maobaolong/incubator-uniffle that referenced this pull request Aug 6, 2024
…et (apache#1952)

### What changes were proposed in this pull request?
Fix flaky test ServletTest.testUnhealthyNodesServlet.

### Why are the changes needed?
In the original logic, shuffleIds will have three elements when only one unhealthy node is obtained for the first time.
https://github.com/apache/incubator-uniffle/actions/runs/10086923444/job/27890257649?pr=1948

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
CI
zhengchenyu pushed a commit that referenced this pull request Aug 9, 2024
…et (#1952)

### What changes were proposed in this pull request?
Fix flaky test ServletTest.testUnhealthyNodesServlet.

### Why are the changes needed?
In the original logic, shuffleIds will have three elements when only one unhealthy node is obtained for the first time.
https://github.com/apache/incubator-uniffle/actions/runs/10086923444/job/27890257649?pr=1948

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky test a flaky test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants