dongjoon-hyun opened a new pull request #29281: URL: https://github.com/apache/spark/pull/29281
### What changes were proposed in this pull request? This PR aims to make `ResourceAllocator.availableAddrs` deterministic. ### Why are the changes needed? Currently, this function returns indeterministically due to the underlying `HashMap`. So, the test case itself is creating a list `[0, 1, 2]` initially, but ends up with comparing `[2, 1, 3]`. Not only this happens in the 3.0.0, but also this causes UT failure on Scala 2.13 environment. ### Does this PR introduce _any_ user-facing change? Yes, but this fixes the in-deterministic behavior. ### How was this patch tested? - Scala 2.12: This should pass the UT with the modified test case. - Scala 2.13: This can be tested like the following. ``` $ dev/change-scala-version.sh 2.13 $ build/mvn test -pl core --am -Pscala-2.13 -Dtest=none -DwildcardSuites=org.apache.spark.deploy.JsonProtocolSuite ``` **BEFORE** ``` *** 2 TESTS FAILED *** ``` **AFTER** ``` All tests passed. ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
