Skip to content

Commit 88bdfa5

Browse files
committed
ut
1 parent fd8bc22 commit 88bdfa5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.kyuubi
1919

20+
import java.util.UUID
21+
2022
import scala.collection.JavaConverters._
2123
import scala.concurrent.duration._
2224

@@ -104,7 +106,10 @@ class KyuubiOperationYarnClusterSuite extends WithKyuubiServerOnYarn with HiveJD
104106

105107
test("open batch session") {
106108
val batchRequest =
107-
newSparkBatchRequest(Map("spark.master" -> "local", "spark.executor.instances" -> "1"))
109+
newSparkBatchRequest(Map(
110+
"spark.master" -> "local",
111+
"spark.executor.instances" -> "1",
112+
"kyuubi.batch.id" -> UUID.randomUUID().toString))
108113

109114
val sessionHandle = sessionManager.openBatchSession(
110115
"kyuubi",
@@ -162,7 +167,9 @@ class KyuubiOperationYarnClusterSuite extends WithKyuubiServerOnYarn with HiveJD
162167
}
163168

164169
test("prevent dead loop if the batch job submission process it not alive") {
165-
val batchRequest = newSparkBatchRequest(Map("spark.submit.deployMode" -> "invalid"))
170+
val batchRequest = newSparkBatchRequest(Map(
171+
"spark.submit.deployMode" -> "invalid",
172+
"kyuubi.batch.id" -> UUID.randomUUID().toString))
166173

167174
val sessionHandle = sessionManager.openBatchSession(
168175
"kyuubi",
@@ -188,7 +195,8 @@ class KyuubiOperationYarnClusterSuite extends WithKyuubiServerOnYarn with HiveJD
188195
"spark.submit.deployMode" -> "cluster",
189196
"spark.sql.defaultCatalog=spark_catalog" -> "spark_catalog",
190197
"spark.sql.catalog.spark_catalog.type" -> "invalid_type",
191-
"kyuubi.session.engine.initialize.timeout" -> "PT10m"))(Map.empty) {
198+
"kyuubi.session.engine.initialize.timeout" -> "PT10M",
199+
"kyuubi.batch.id" -> UUID.randomUUID().toString))(Map.empty) {
192200
val startTime = System.currentTimeMillis()
193201
val exception = intercept[Exception] {
194202
withJdbcStatement() { _ => }

kyuubi-server/src/test/scala/org/apache/kyuubi/events/handler/ServerJsonLoggingEventHandlerSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class ServerJsonLoggingEventHandlerSuite extends WithKyuubiServer with HiveJDBCT
138138
Utils.currentUser,
139139
"kyuubi",
140140
"127.0.0.1",
141-
Map.empty,
141+
Map("kyuubi.batch.id" -> UUID.randomUUID().toString),
142142
batchRequest)
143143
withSessionConf()(Map.empty)(Map("spark.sql.shuffle.partitions" -> "2")) {
144144
withJdbcStatement() { statement =>

0 commit comments

Comments
 (0)