Skip to content

Commit d383e89

Browse files
committed
fix
1 parent 1ffbfdb commit d383e89

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/PaimonHiveTestBase.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ import org.apache.spark.SparkConf
2626
import org.apache.spark.sql.paimon.Utils
2727

2828
import java.io.File
29+
import java.util.concurrent.ThreadLocalRandom
2930

3031
class PaimonHiveTestBase extends PaimonSparkTestBase {
3132

3233
import PaimonHiveTestBase._
3334

35+
protected lazy val random: Int = ThreadLocalRandom.current().nextInt(10000)
36+
3437
protected lazy val tempHiveDBDir: File = Utils.createTempDir
3538

3639
protected lazy val testHiveMetastore: TestHiveMetastore = new TestHiveMetastore
@@ -39,7 +42,7 @@ class PaimonHiveTestBase extends PaimonSparkTestBase {
3942

4043
protected val paimonHiveCatalogName: String = "paimon_hive"
4144

42-
protected val hiveDbName: String = "test_hive"
45+
protected val hiveDbName: String = s"test_hive$random"
4346

4447
/**
4548
* Add spark_catalog ([[SparkGenericCatalog]] in hive) and paimon_hive ([[SparkCatalog]] in hive)

paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/procedure/MigrateDatabaseProcedureTest.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import java.util.concurrent.ThreadLocalRandom
2626

2727
class MigrateDatabaseProcedureTest extends PaimonHiveTestBase {
2828

29-
private val random = ThreadLocalRandom.current().nextInt(10000)
30-
3129
Seq("parquet", "orc", "avro").foreach(
3230
format => {
3331
test(s"Paimon migrate database procedure: migrate $format non-partitioned database") {

paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/procedure/MigrateFileProcedureTest.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import java.util.concurrent.ThreadLocalRandom
2626

2727
class MigrateFileProcedureTest extends PaimonHiveTestBase {
2828

29-
private val random = ThreadLocalRandom.current().nextInt(10000)
30-
3129
Seq("parquet", "orc", "avro").foreach(
3230
format => {
3331
test(s"Paimon migrate file procedure: migrate $format non-partitioned table") {

paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/procedure/MigrateTableProcedureTest.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import java.util.concurrent.ThreadLocalRandom
2727

2828
class MigrateTableProcedureTest extends PaimonHiveTestBase {
2929

30-
private val random = ThreadLocalRandom.current().nextInt(10000)
31-
3230
Seq("parquet", "orc", "avro").foreach(
3331
format => {
3432
test(s"Paimon migrate table procedure: migrate $format non-partitioned table") {

0 commit comments

Comments
 (0)