Skip to content

Commit 125c1da

Browse files
committed
Revert "[SPARK-48139][CONNECT][TESTS] Try stabilising multi-thread tests in CI"
This reverts commit bb8b691.
1 parent 793a7df commit 125c1da

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SparkSessionE2ESuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.apache.spark.sql
1818

19-
import java.util.concurrent.Executors
19+
import java.util.concurrent.ForkJoinPool
2020

2121
import scala.collection.mutable
2222
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
@@ -137,14 +137,15 @@ class SparkSessionE2ESuite extends ConnectFunSuite with RemoteSparkSession {
137137
assert(interrupted.length == 2, s"Interrupted operations: $interrupted.")
138138
}
139139

140-
test("interrupt tag") {
140+
// TODO(SPARK-48139): Re-enable `SparkSessionE2ESuite.interrupt tag`
141+
ignore("interrupt tag") {
141142
val session = spark
142143
import session.implicits._
143144

144145
// global ExecutionContext has only 2 threads in Apache Spark CI
145146
// create own thread pool for four Futures used in this test
146147
val numThreads = 4
147-
val fpool = Executors.newFixedThreadPool(numThreads)
148+
val fpool = new ForkJoinPool(numThreads)
148149
val executionContext = ExecutionContext.fromExecutorService(fpool)
149150

150151
val q1 = Future {

core/src/test/scala/org/apache/spark/JobCancellationSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark
1919

20-
import java.util.concurrent.{Executors, Semaphore, TimeUnit}
20+
import java.util.concurrent.{Semaphore, TimeUnit}
2121
import java.util.concurrent.atomic.AtomicInteger
2222

2323
import scala.collection.mutable.ArrayBuffer
@@ -302,7 +302,7 @@ class JobCancellationSuite extends SparkFunSuite with Matchers with BeforeAndAft
302302
// global ExecutionContext has only 2 threads in Apache Spark CI
303303
// create own thread pool for four Futures used in this test
304304
val numThreads = 4
305-
val fpool = Executors.newFixedThreadPool(numThreads)
305+
val fpool = ThreadUtils.newForkJoinPool("job-tags-test-thread-pool", numThreads)
306306
val executionContext = ExecutionContext.fromExecutorService(fpool)
307307

308308
try {

sql/core/src/test/scala/org/apache/spark/sql/SparkSessionJobTaggingAndCancellationSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.sql
1919

20-
import java.util.concurrent.{ConcurrentHashMap, Executors, Semaphore, TimeUnit}
20+
import java.util.concurrent.{ConcurrentHashMap, Semaphore, TimeUnit}
2121
import java.util.concurrent.atomic.AtomicInteger
2222

2323
import scala.concurrent.{ExecutionContext, Future}
@@ -121,7 +121,7 @@ class SparkSessionJobTaggingAndCancellationSuite
121121
// global ExecutionContext has only 2 threads in Apache Spark CI
122122
// create own thread pool for four Futures used in this test
123123
val numThreads = 3
124-
val fpool = Executors.newFixedThreadPool(numThreads)
124+
val fpool = ThreadUtils.newForkJoinPool("job-tags-test-thread-pool", numThreads)
125125
val executionContext = ExecutionContext.fromExecutorService(fpool)
126126

127127
try {

0 commit comments

Comments
 (0)