Skip to content

Commit 4179ffc

Browse files
falakiyhuai
authored andcommitted
[SPARK-20661][SPARKR][TEST] SparkR tableNames() test fails
## What changes were proposed in this pull request? Cleaning existing temp tables before running tableNames tests ## How was this patch tested? SparkR Unit tests Author: Hossein <[email protected]> Closes #17903 from falaki/SPARK-20661. (cherry picked from commit 2abfee1) Signed-off-by: Yin Huai <[email protected]>
1 parent 23681e9 commit 4179ffc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/pkg/inst/tests/testthat/test_sparkSQL.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ test_that("jsonRDD() on a RDD with json string", {
668668
})
669669

670670
test_that("test tableNames and tables", {
671+
# Making sure there are no registered temp tables from previous tests
672+
suppressWarnings(sapply(tableNames(), function(tname) { dropTempTable(tname) }))
671673
df <- read.json(jsonPath)
672674
createOrReplaceTempView(df, "table1")
673675
expect_equal(length(tableNames()), 1)

0 commit comments

Comments
 (0)