Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/14757#discussion_r75800677 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala --- @@ -40,6 +40,15 @@ abstract class ExternalCatalogSuite extends SparkFunSuite with BeforeAndAfterEac protected def resetState(): Unit = { } + // Clear all state before each test + override def beforeEach(): Unit = { + try { + resetState() --- End diff -- https://github.com/apache/spark/blob/7bb64aae27f670531699f59d3f410e38866609b7/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogSuite.scala#L31-L35 Before this PR, we create a metastore at a temp location to avoid any potential conflict of having multiple connections to a single derby instance. This does not sound an issue now. Is my understanding right? If we do not create a new metastore, we have to clean the existing metastore; otherwise, [the checking](https://github.com/apache/spark/blob/5effc016c893ce917d535cc1b5026d8e4c846721/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala#L60-L61) in the test case could fail.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org