File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1818
1919package org .apache .paimon .spark
2020
21+ import javolution .util .ReentrantLock
2122import org .apache .paimon .hive .TestHiveMetastore
2223import org .apache .paimon .table .FileStoreTable
23-
2424import org .apache .hadoop .conf .Configuration
2525import org .apache .spark .SparkConf
2626import org .apache .spark .sql .paimon .Utils
2727
2828import java .io .File
2929import java .util .concurrent .ThreadLocalRandom
30+ import java .util .concurrent .locks .Lock
3031
3132class PaimonHiveTestBase extends PaimonSparkTestBase {
3233
@@ -60,6 +61,7 @@ class PaimonHiveTestBase extends PaimonSparkTestBase {
6061 }
6162
6263 override protected def beforeAll (): Unit = {
64+ lock.lock()
6365 testHiveMetastore.start(hivePort)
6466 super .beforeAll()
6567 spark.sql(s " USE $sparkCatalogName" )
@@ -71,6 +73,7 @@ class PaimonHiveTestBase extends PaimonSparkTestBase {
7173 spark.sql(s " USE $sparkCatalogName" )
7274 spark.sql(" USE default" )
7375 spark.sql(s " DROP DATABASE $hiveDbName CASCADE " )
76+ lock.unlock()
7477 } finally {
7578 super .afterAll()
7679 testHiveMetastore.stop()
@@ -97,4 +100,6 @@ object PaimonHiveTestBase {
97100 }
98101
99102 val hivePort : Int = hiveUri.split(" :" )(2 ).toInt
103+
104+ val lock = new ReentrantLock
100105}
You can’t perform that action at this time.
0 commit comments