Skip to content

Commit

Permalink
Updating unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yudovin committed Jan 25, 2020
1 parent 8da2c55 commit 30686b4
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,13 @@ class ExternalCatalogEventSuite extends SparkFunSuite {
RenamePartitionEvent("db5", "tbl1", Seq(partition.spec), Seq(newPartition.spec)) ::
Nil)

// ALTER
catalog.alterPartitions("db5", "tbl1", Seq.empty)
checkEvents(AlterPartitionPreEvent("db5", "tbl1", Seq.empty) ::
AlterPartitionEvent("db5", "tbl1", Seq.empty) :: Nil)

// DROP
intercept[AnalysisException] {
val message = intercept[AnalysisException] {
catalog.dropPartitions("db5", "tbl2", Seq(newPartition.spec),
ignoreIfNotExists = false, purge = true, retainData = false)
}
}.getMessage

assert(message.equals("Table or view 'tbl2' not found in database 'db5';"))
checkEvents(DropPartitionPreEvent("db5", "tbl2", Seq(newPartition.spec)) :: Nil)

catalog.dropPartitions("db5", "tbl1", Seq(newPartition.spec),
Expand Down

0 comments on commit 30686b4

Please sign in to comment.