Skip to content

Commit

Permalink
Skip Windows test on Linux and repleace jars to list
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed May 25, 2016
1 parent 6f0933d commit 64141d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions R/pkg/inst/tests/testthat/test_Windows.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
context("test the support SparkR on Windows")

test_that("sparkJars tag in SparkContext", {
if (.Platform$OS.type != "windows") {
skip("This test is only for Windows, skipped")
}
testOutput <- determineLauncher("ECHO" ,"/a/b/c" , capture = TRUE)
abcPath <- testOutput[1]
expect_equal(abcPath, "\\a\\b\\c")
Expand Down
6 changes: 3 additions & 3 deletions R/pkg/inst/tests/testthat/test_context.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ test_that("getClientModeSparkSubmitOpts() returns spark-submit args from whiteli
test_that("sparkJars sparkPackages as comma-separated strings", {
expect_warning(processSparkJars(" a, b "))
jars <- suppressWarnings(processSparkJars(" a, b "))
expect_equal(sapply(jars, basename), c("a", "b"))
expect_equal(lapply(jars, basename), list("a", "b"))

jars <- suppressWarnings(processSparkJars(" abc ,, def "))
expect_equal(sapply(jars, basename), c("abc", "def"))
expect_equal(lapply(jars, basename), list("abc", "def"))

jars <- suppressWarnings(processSparkJars(c(" abc ,, def ", "", "xyz", " ", "a,b")))
expect_equal(sapply(jars, basename), c("abc", "def", "xyz", "a", "b"))
expect_equal(lapply(jars, basename), list("abc", "def", "xyz", "a", "b"))

p <- processSparkPackages(c("ghi", "lmn"))
expect_equal(p, c("ghi", "lmn"))
Expand Down

0 comments on commit 64141d2

Please sign in to comment.