Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23194#discussion_r238256775
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 
---
    @@ -439,31 +440,22 @@ abstract class DDLSuite extends QueryTest with 
SQLTestUtils {
               }.getMessage
               assert(ex.contains(exMsgWithDefaultDB))
             }
    -      } finally {
    -        waitForTasksToFinish()
    -        Utils.deleteRecursively(tableLoc)
           }
         }
       }
     
       test("rename a managed table with existing empty directory") {
    -    val tableLoc = new 
File(spark.sessionState.catalog.defaultTablePath(TableIdentifier("tab2")))
    -    try {
    +    withTableLocation("tab2") { tableLoc =>
           withTable("tab1") {
             sql(s"CREATE TABLE tab1 USING $dataSource AS SELECT 1, 'a'")
    -        tableLoc.mkdir()
             val ex = intercept[AnalysisException] {
               sql("ALTER TABLE tab1 RENAME TO tab2")
             }.getMessage
             val expectedMsg = "Can not rename the managed table('`tab1`'). The 
associated location"
             assert(ex.contains(expectedMsg))
           }
    -    } finally {
    -      waitForTasksToFinish()
    -      Utils.deleteRecursively(tableLoc)
         }
       }
    -
    --- End diff --
    
    nit: revert this


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to