diff --git a/R/pkg/tests/fulltests/test_sparkSQL_eager.R b/R/pkg/tests/fulltests/test_sparkSQL_eager.R index df7354fa063e..9b4489a47b65 100644 --- a/R/pkg/tests/fulltests/test_sparkSQL_eager.R +++ b/R/pkg/tests/fulltests/test_sparkSQL_eager.R @@ -22,12 +22,12 @@ context("test show SparkDataFrame when eager execution is enabled.") test_that("eager execution is not enabled", { # Start Spark session without eager execution enabled sparkR.session(master = sparkRTestMaster, enableHiveSupport = FALSE) - + df <- createDataFrame(faithful) expect_is(df, "SparkDataFrame") expected <- "eruptions:double, waiting:double" expect_output(show(df), expected) - + # Stop Spark session sparkR.session.stop() }) @@ -35,9 +35,9 @@ test_that("eager execution is not enabled", { test_that("eager execution is enabled", { # Start Spark session with eager execution enabled sparkConfig <- list(spark.sql.repl.eagerEval.enabled = "true") - + sparkR.session(master = sparkRTestMaster, enableHiveSupport = FALSE, sparkConfig = sparkConfig) - + df <- createDataFrame(faithful) expect_is(df, "SparkDataFrame") expected <- paste0("(+---------+-------+\n", @@ -45,7 +45,7 @@ test_that("eager execution is enabled", { "+---------+-------+\n)*", "(only showing top 20 rows)") expect_output(show(df), expected) - + # Stop Spark session sparkR.session.stop() }) @@ -55,9 +55,9 @@ test_that("eager execution is enabled with maxNumRows and truncate set", { sparkConfig <- list(spark.sql.repl.eagerEval.enabled = "true", spark.sql.repl.eagerEval.maxNumRows = as.integer(5), spark.sql.repl.eagerEval.truncate = as.integer(2)) - + sparkR.session(master = sparkRTestMaster, enableHiveSupport = FALSE, sparkConfig = sparkConfig) - + df <- arrange(createDataFrame(faithful), "waiting") expect_is(df, "SparkDataFrame") expected <- paste0("(+---------+-------+\n", @@ -66,7 +66,7 @@ test_that("eager execution is enabled with maxNumRows and truncate set", { "| 1.| 43|\n)*", "(only showing top 5 rows)") expect_output(show(df), expected) - + # Stop Spark session sparkR.session.stop() })