1717
1818package org .apache .kyuubi
1919
20+ import java .util .UUID
21+
2022import scala .collection .JavaConverters ._
2123import 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() { _ => }
0 commit comments