aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/test_client.R
diff options
context:
space:
mode:
authortrestletech <jeff.allen@trestletechnology.net>2015-07-28 10:45:19 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2015-07-28 10:45:19 -0700
commit614323406225a3522ee601935ce3052449614145 (patch)
tree1fcc3864f2dcd27c7ed9f00b91c1b87063d88e09 /R/pkg/inst/tests/test_client.R
parent35ef853b3f9d955949c464e4a0d445147e0e9a07 (diff)
downloadspark-614323406225a3522ee601935ce3052449614145.tar.gz
spark-614323406225a3522ee601935ce3052449614145.tar.bz2
spark-614323406225a3522ee601935ce3052449614145.zip
Use vector-friendly comparison for packages argument.
Otherwise, `sparkR.init()` with multiple `sparkPackages` results in this warning: ``` Warning message: In if (packages != "") { : the condition has length > 1 and only the first element will be used ``` Author: trestletech <jeff.allen@trestletechnology.net> Closes #7701 from trestletech/compare-packages and squashes the following commits: 72c8b36 [trestletech] Correct function name. c52db0e [trestletech] Added test for multiple packages. 3aab1a7 [trestletech] Use vector-friendly comparison for packages argument.
Diffstat (limited to 'R/pkg/inst/tests/test_client.R')
-rw-r--r--R/pkg/inst/tests/test_client.R4
1 files changed, 4 insertions, 0 deletions
diff --git a/R/pkg/inst/tests/test_client.R b/R/pkg/inst/tests/test_client.R
index 30b05c1a2a..8a20991f89 100644
--- a/R/pkg/inst/tests/test_client.R
+++ b/R/pkg/inst/tests/test_client.R
@@ -30,3 +30,7 @@ test_that("no package specified doesn't add packages flag", {
expect_equal(gsub("[[:space:]]", "", args),
"")
})
+
+test_that("multiple packages don't produce a warning", {
+ expect_that(generateSparkSubmitArgs("", "", "", "", c("A", "B")), not(gives_warning()))
+})