Skip to content

Commit 3723332

Browse files
falakilycplus
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 apache#17903 from falaki/SPARK-20661.
1 parent 2a52bab commit 3723332

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
@@ -677,6 +677,8 @@ test_that("jsonRDD() on a RDD with json string", {
677677
})
678678

679679
test_that("test tableNames and tables", {
680+
# Making sure there are no registered temp tables from previous tests
681+
suppressWarnings(sapply(tableNames(), function(tname) { dropTempTable(tname) }))
680682
df <- read.json(jsonPath)
681683
createOrReplaceTempView(df, "table1")
682684
expect_equal(length(tableNames()), 1)

0 commit comments

Comments
 (0)