Github user gvramana commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/814#discussion_r112625087
--- Diff:
integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala
---
@@ -95,6 +96,17 @@ class AlterTableRevertTestCase extends QueryTest with
BeforeAndAfterAll {
}
}
+ test("test to check if exception during rename table does not throws
table not found exception") {
+ val locks = AlterTableUtil
+ .validateTableAndAcquireLock("default", "reverttest",
List("meta.lock"))(sqlContext
+ .sparkSession)
+ val exception = intercept[RuntimeException] {
+ sql("alter table reverttest rename to revert")
+ }
+ assert(exception.getMessage == "Alter table rename table operation
failed: Table is locked for updation. Please try after some time")
+ AlterTableUtil.releaseLocks(locks)
--- End diff --
release lock should be above assert. If testcase fails lock will not be
released
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---