d015eff16d
### What changes were proposed in this pull request? Change primaryResource assertion from exact match to suffix match in case SparkSubmitSuite.`handles k8s cluster mode` ### Why are the changes needed? When I run SparkSubmitSuite on MacOs 10.15.7, I got AssertionError for `handles k8s cluster mode` test after pr [SPARK-35691](https://issues.apache.org/jira/browse/SPARK-35691), due to `File(path).getCanonicalFile().toURI()` function with absolute path as parameter will return path begin with `/System/Volumes/Data` on MacOs higher tha 10.15. eg. `/home/testjars.jar` will get `file:/System/Volumes/Data/home/testjars.jar` In order to pass UT on MacOs higher than 10.15, we change the assertion into suffix match ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? 1. Pass the GitHub Action 2. Manually test - environment: MacOs > 10.15 - commad: `build/mvn clean install -Phadoop-3.2 -Phive-2.3 -Phadoop-cloud -Pmesos -Pyarn -Pkinesis-asl -Phive-thriftserver -Pspark-ganglia-lgpl -Pkubernetes -pl core -am -DwildcardSuites=org.apache.spark.deploy.SparkSubmitSuite -Dtest=none` - Test result: - before this pr, case failed with following exception: `- handles k8s cluster mode *** FAILED *** Some("file:/System/Volumes/Data/home/thejar.jar") was not equal to Some("file:/home/thejar.jar") (SparkSubmitSuite.scala:485) Analysis: Some(value: "file:/[System/Volumes/Data/]home/thejar.jar" -> "file:/[]home/thejar.jar")` - after this pr, run all test successfully Closes #32948 from toujours33/SPARK-35796. Authored-by: toujours33 <wangyazhi@baidu.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |