Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-514] Fix flaky test: ShuffleServerGrpcTest#clearResourceTest #516

Merged
merged 4 commits into from
Jan 29, 2023

Conversation

xianjingfeng
Copy link
Member

What changes were proposed in this pull request?

Fix flaky test: ShuffleServerGrpcTest#clearResourceTest. Fix #514

Why are the changes needed?

It is flaky test.
In this UT, rss.server.preAllocation.expired=5000, so ShuffleTaskManager#checkResourceStatus will be invoked for every 2.5 seconds and expired app may will not be removed until 7.5 seconds after stop heartbeat. So sleep 8 seconds may not be reliable.

Does this PR introduce any user-facing change?

No

How was this patch tested?

No need

@xianjingfeng xianjingfeng changed the title [ISSYE-514] Fix flaky test: ShuffleServerGrpcTest#clearResourceTest [ISSUE-514] Fix flaky test: ShuffleServerGrpcTest#clearResourceTest Jan 29, 2023
Copy link
Contributor

@kaijchen kaijchen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @xianjingfeng for the fix.

@@ -160,7 +160,8 @@ public void clearResourceTest() throws Exception {

// clearResourceTest1 will be removed because of rss.server.app.expired.withoutHeartbeat
t.interrupt();
Awaitility.await().timeout(20, TimeUnit.SECONDS).until(() -> shuffleServers.get(0).getShuffleTaskManager().getAppIds().size() == 0);
Awaitility.await().timeout(20, TimeUnit.SECONDS).until(
() -> shuffleServers.get(0).getShuffleTaskManager().getAppIds().size() == 0);
assertEquals(0, shuffleServers.get(0).getShuffleTaskManager().getAppIds().size());
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is not needed now.
However, it's OK to keep it.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2023

Codecov Report

Merging #516 (47d1150) into master (0a6605b) will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #516      +/-   ##
============================================
+ Coverage     59.73%   59.75%   +0.01%     
- Complexity     1764     1765       +1     
============================================
  Files           205      205              
  Lines         11527    11527              
  Branches       1033     1033              
============================================
+ Hits           6886     6888       +2     
+ Misses         4234     4233       -1     
+ Partials        407      406       -1     
Impacted Files Coverage Δ
...pache/hadoop/mapreduce/task/reduce/RssFetcher.java 92.30% <0.00%> (+1.53%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kaijchen kaijchen merged commit cdbbc94 into apache:master Jan 29, 2023
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.

Flaky Test: ShuffleServerGrpcTest#clearResourceTest
4 participants