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

[MINOR] Fix flaky test testGetHostIp #141

Merged
merged 1 commit into from Aug 8, 2022

Conversation

izchen
Copy link
Contributor

@izchen izchen commented Aug 8, 2022

What changes were proposed in this pull request?

Do not use InetAddress.getLocalHost().getHostAddress() in test because it is indeterminate. The return value may be different on a multi-NIC machine or on different system.

Why are the changes needed?

In addition to 127.0.0.1, the loopback address 127.0.1.1 can also be returned, which happens on Debian.This will make UT fail.

org.opentest4j.AssertionFailedError: 
Expected :127.0.1.1
Actual   :10.0.191.230

at org.apache.uniffle.common.util.RssUtilsTest.testGetHostIp(RssUtilsTest.java:64)

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UT.

@jerqi jerqi changed the title [Minor] Fix flaky test testGetHostIp [MINOR] Fix flaky test testGetHostIp Aug 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #141 (2c81eec) into master (79804c5) will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #141      +/-   ##
============================================
+ Coverage     57.18%   57.21%   +0.03%     
  Complexity     1201     1201              
============================================
  Files           150      150              
  Lines          8179     8185       +6     
  Branches        773      773              
============================================
+ Hits           4677     4683       +6     
  Misses         3256     3256              
  Partials        246      246              
Impacted Files Coverage Δ
.../java/org/apache/uniffle/common/util/RssUtils.java 66.19% <ø> (ø)
.../java/org/apache/spark/shuffle/RssSparkConfig.java 96.66% <0.00%> (+0.17%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@jerqi
Copy link
Contributor

jerqi commented Aug 8, 2022

Thanks @izchen , wait for GA.

@izchen
Copy link
Contributor Author

izchen commented Aug 8, 2022

Thanks for your review, @jerqi !

@jerqi jerqi merged commit 04cbdbb into apache:master Aug 8, 2022
@izchen izchen deleted the fix_testGetHostIp branch August 8, 2022 08:38
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.

None yet

3 participants