aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/test_context.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/pkg/inst/tests/test_context.R')
-rw-r--r--R/pkg/inst/tests/test_context.R10
1 files changed, 10 insertions, 0 deletions
diff --git a/R/pkg/inst/tests/test_context.R b/R/pkg/inst/tests/test_context.R
index 513bbc8e62..e99815ed15 100644
--- a/R/pkg/inst/tests/test_context.R
+++ b/R/pkg/inst/tests/test_context.R
@@ -26,6 +26,16 @@ test_that("repeatedly starting and stopping SparkR", {
}
})
+test_that("repeatedly starting and stopping SparkR SQL", {
+ for (i in 1:4) {
+ sc <- sparkR.init()
+ sqlContext <- sparkRSQL.init(sc)
+ df <- createDataFrame(sqlContext, data.frame(a = 1:20))
+ expect_equal(count(df), 20)
+ sparkR.stop()
+ }
+})
+
test_that("rdd GC across sparkR.stop", {
sparkR.stop()
sc <- sparkR.init() # sc should get id 0