9dc0237851
### 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, 0]`. Not only this happens in the 3.0.0, but also this causes UT failures 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 (at least `JsonProtocolSuite`) ``` $ 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. ``` Closes #29281 from dongjoon-hyun/SPARK-32476. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |