Uh oh!
There was an error while loading. Please reload this page.
[SPARK-18422][CORE] Fix wholeTextFiles test to pass on Windows in JavaAPISuite - #15866
[SPARK-18422][CORE] Fix wholeTextFiles test to pass on Windows in JavaAPISuite#15866HyukjinKwon wants to merge 2 commits into
Conversation
@srowen It seems And, other some failures specified in the parent JIRA of this seems caused by the problems in Will try to make another PR soon for this. |
SparkQA
commented
Nov 12, 2016
Test build #68569 has finished for PR 15866 at commit
|
srowen
left a comment
There was a problem hiding this comment.
I'm OK with this, but if the point is to avoid hard-coding "/", is it sufficient to use the File(String, String) constructor? whatever works and is most consistent with other tests is OK by me. I know they're not that consistent now anyway.
Thank you Sean. Actually, this is a bit annoying. Here is what happened in the original test.
Just FWIW, (at least for myself to note this problem somewhere and re-visit sometime), it seems both back-slash and slash are fine with scala>newFile("C:/a")
res9: java.io.File=C:\a
scala>newFile("C:\\a", "/part-0000")
res10: java.io.File=C:\a\part-0000 |
HyukjinKwon
commented
Nov 14, 2016
Let me add a comment here and will try to clean up more. |
srowen
left a comment
There was a problem hiding this comment.
OK I trust your judgment about how best to fix it.
HyukjinKwon
commented
Nov 14, 2016
Build started: [CORE] |
SparkQA
commented
Nov 14, 2016
Test build #68615 has finished for PR 15866 at commit
|
srowen
commented
Nov 15, 2016
Looks OK to me @HyukjinKwon but does the appveyor result in your comment above mean that it still fails on Windows? |
Oh, the test this PR tries to deal with, Before After FWIW, It seems the root exception for |
srowen
commented
Nov 18, 2016
OK if it makes the test in question here pass, let's merge it, as a fix for that test. That much is OK right @HyukjinKwon ? |
HyukjinKwon
commented
Nov 18, 2016
Yes please. I am pretty sure that this is a right fix without any other side effects. |
…aAPISuite ## What changes were proposed in this pull request? This PR fixes the test `wholeTextFiles` in `JavaAPISuite.java`. This is failed due to the different path format on Windows. For example, the path in `container` was ``` C:\projects\spark\target\tmp\1478967560189-0/part-00000 ``` whereas `new URI(res._1()).getPath()` was as below: ``` /C:/projects/spark/target/tmp/1478967560189-0/part-00000 ``` ## How was this patch tested? Tests in `JavaAPISuite.java`. Tested via AppVeyor. **Before** Build: https://ci.appveyor.com/project/spark-test/spark/build/63-JavaAPISuite-1 Diff: master...spark-test:JavaAPISuite-1 ``` [info] Test org.apache.spark.JavaAPISuite.wholeTextFiles started [error] Test org.apache.spark.JavaAPISuite.wholeTextFiles failed: java.lang.AssertionError: expected:<spark is easy to use. [error] > but was:<null>, took 0.578 sec [error] at org.apache.spark.JavaAPISuite.wholeTextFiles(JavaAPISuite.java:1089) ... ``` **After** Build started: [CORE] `org.apache.spark.JavaAPISuite` [](https://ci.appveyor.com/project/spark-test/spark/branch/198DDA52-F201-4D2B-BE2F-244E0C1725B2) Diff: master...spark-test:198DDA52-F201-4D2B-BE2F-244E0C1725B2 ``` [info] Test org.apache.spark.JavaAPISuite.wholeTextFiles started ... ``` Author: hyukjinkwon <gurwls223@gmail.com> Closes#15866 from HyukjinKwon/SPARK-18422. (cherry picked from commit 40d59ff) Signed-off-by: Sean Owen <sowen@cloudera.com>
srowen
commented
Nov 18, 2016
Merged to master/2.1 |
…aAPISuite ## What changes were proposed in this pull request? This PR fixes the test `wholeTextFiles` in `JavaAPISuite.java`. This is failed due to the different path format on Windows. For example, the path in `container` was ``` C:\projects\spark\target\tmp\1478967560189-0/part-00000 ``` whereas `new URI(res._1()).getPath()` was as below: ``` /C:/projects/spark/target/tmp/1478967560189-0/part-00000 ``` ## How was this patch tested? Tests in `JavaAPISuite.java`. Tested via AppVeyor. **Before** Build: https://ci.appveyor.com/project/spark-test/spark/build/63-JavaAPISuite-1 Diff: apache/spark@master...spark-test:JavaAPISuite-1 ``` [info] Test org.apache.spark.JavaAPISuite.wholeTextFiles started [error] Test org.apache.spark.JavaAPISuite.wholeTextFiles failed: java.lang.AssertionError: expected:<spark is easy to use. [error] > but was:<null>, took 0.578 sec [error] at org.apache.spark.JavaAPISuite.wholeTextFiles(JavaAPISuite.java:1089) ... ``` **After** Build started: [CORE] `org.apache.spark.JavaAPISuite` [](https://ci.appveyor.com/project/spark-test/spark/branch/198DDA52-F201-4D2B-BE2F-244E0C1725B2) Diff: apache/spark@master...spark-test:198DDA52-F201-4D2B-BE2F-244E0C1725B2 ``` [info] Test org.apache.spark.JavaAPISuite.wholeTextFiles started ... ``` Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#15866 from HyukjinKwon/SPARK-18422.
What changes were proposed in this pull request?
This PR fixes the test
wholeTextFilesinJavaAPISuite.java. This is failed due to the different path format on Windows.For example, the path in
containerwaswhereas
new URI(res._1()).getPath()was as below:How was this patch tested?
Tests in
JavaAPISuite.java.Tested via AppVeyor.
Before
Build: https://ci.appveyor.com/project/spark-test/spark/build/63-JavaAPISuite-1
Diff: master...spark-test:JavaAPISuite-1
After
Build started: [CORE]
org.apache.spark.JavaAPISuiteDiff: master...spark-test:198DDA52-F201-4D2B-BE2F-244E0C1725B2