File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ package org.apache.paimon.spark
2121import org .apache .paimon .hive .TestHiveMetastore
2222import org .apache .paimon .table .FileStoreTable
2323
24- import javolution .util .ReentrantLock
2524import org .apache .hadoop .conf .Configuration
2625import org .apache .spark .SparkConf
2726import org .apache .spark .sql .paimon .Utils
2827
2928import java .io .File
30- import java .util .concurrent .ThreadLocalRandom
29+ import java .util .concurrent .{ThreadLocalRandom , TimeUnit }
30+ import java .util .concurrent .locks .ReentrantLock
3131
3232class PaimonHiveTestBase extends PaimonSparkTestBase {
3333
@@ -61,7 +61,7 @@ class PaimonHiveTestBase extends PaimonSparkTestBase {
6161 }
6262
6363 override protected def beforeAll (): Unit = {
64- lock.lock( )
64+ lock.tryLock( 10 , TimeUnit . MINUTES )
6565 testHiveMetastore.start(hivePort)
6666 super .beforeAll()
6767 spark.sql(s " USE $sparkCatalogName" )
@@ -73,10 +73,10 @@ class PaimonHiveTestBase extends PaimonSparkTestBase {
7373 spark.sql(s " USE $sparkCatalogName" )
7474 spark.sql(" USE default" )
7575 spark.sql(s " DROP DATABASE $hiveDbName CASCADE " )
76- lock.unlock()
7776 } finally {
7877 super .afterAll()
7978 testHiveMetastore.stop()
79+ lock.unlock()
8080 }
8181 }
8282
You can’t perform that action at this time.
0 commit comments