Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17274#discussion_r106471026
  
    --- Diff: R/pkg/inst/tests/testthat/test_context.R ---
    @@ -177,6 +177,13 @@ test_that("add and get file to be downloaded with 
Spark job on every node", {
       spark.addFile(path)
       download_path <- spark.getSparkFiles(filename)
       expect_equal(readLines(download_path), words)
    +
    +  # Test spark.getSparkFiles works well on executors.
    +  seq <- seq(from = 1, to = 10, length.out = 5)
    +  f <- function(seq) { readLines(spark.getSparkFiles(filename)) }
    +  results <- spark.lapply(seq, f)
    +  for (i in 1:5) { expect_equal(results[[i]], words) }
    +
    --- End diff --
    
    The way you suggested can pass as well. After further investigating, I 
found 
[```install.spark()```](https://github.com/apache/spark/blob/master/R/pkg/tests/run-all.R#L25)
 is the root cause that makes my test fail. But I still not figure out which 
line in that function caused the failure.
    I change the test case to a more simple way, which can still verify the 
fix. Without this fix, the updated test will fail. Since Spark 2.2 is coming 
and this fix passed for sparkR shell test and yarn cluster mode test, we can 
get this in firstly, and leave a todo for that weird test failure.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to