From 897e906dd6e68862a415a78f0147598adabff5f6 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Tue, 4 Nov 2025 16:49:43 +0100 Subject: [PATCH 1/2] bugfix: Use numberOfWorkers instead --- compiler/test/dotc/comptest.scala | 2 +- .../dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/CompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/FromTastyTests.scala | 2 +- compiler/test/dotty/tools/dotc/IdempotencyTests.scala | 2 +- compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala | 2 +- compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala | 2 +- compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala | 6 +++--- compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala | 2 +- compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala | 2 +- .../scala/dotty/tools/dotc/ScalaJSCompilationTests.scala | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compiler/test/dotc/comptest.scala b/compiler/test/dotc/comptest.scala index fb53f561a94d..2e0184cddb8f 100644 --- a/compiler/test/dotc/comptest.scala +++ b/compiler/test/dotc/comptest.scala @@ -7,7 +7,7 @@ import scala.concurrent.duration._ object comptest extends ParallelTesting { def maxDuration = 3.seconds - def numberOfSlaves = 5 + def numberOfWorkers = 5 def safeMode = false def isInteractive = true def testFilter = Nil diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index ce46b669e2c8..8df6a6a933fc 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -204,7 +204,7 @@ object BootstrappedOnlyCompilationTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 100.seconds - def numberOfSlaves = Runtime.getRuntime().availableProcessors() + def numberOfWorkers = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 9571e80d5ccd..be26d2fa934f 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -322,7 +322,7 @@ object CompilationTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 45.seconds - def numberOfSlaves = Runtime.getRuntime().availableProcessors() + def numberOfWorkers = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index 874088fb618e..fa1d9acff316 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -44,7 +44,7 @@ object FromTastyTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 30.seconds - def numberOfSlaves = Runtime.getRuntime().availableProcessors() + def numberOfWorkers = Runtime.getRuntime().availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala index b515ebb05f96..031e6d0cc7e0 100644 --- a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala +++ b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala @@ -72,7 +72,7 @@ object IdempotencyTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 30.seconds - def numberOfSlaves = 5 + def numberOfWorkers = 5 def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala b/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala index 50e07f388dc4..c24dc079bfc1 100644 --- a/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala +++ b/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala @@ -110,7 +110,7 @@ object TastyBootstrapTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 45.seconds - def numberOfSlaves = Runtime.getRuntime.availableProcessors() + def numberOfWorkers = Runtime.getRuntime.availableProcessors() def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala b/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala index 17aa49f23768..d86a84059ed8 100644 --- a/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala +++ b/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala @@ -124,7 +124,7 @@ object CoverageTests extends ParallelTesting: import scala.concurrent.duration.* def maxDuration = 30.seconds - def numberOfSlaves = 1 + def numberOfWorkers = 1 def safeMode = Properties.testsSafeMode def testFilter = Properties.testsFilter diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 8e9a27e766b4..c788419defd8 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -15,7 +15,7 @@ import scala.concurrent.{ Await, Future } import scala.concurrent.ExecutionContext.Implicits.global import scala.collection.mutable -/** Vulpix spawns JVM subprocesses (`numberOfSlaves`) in order to run tests +/** Vulpix spawns JVM subprocesses (`numberOfWorkers`) in order to run tests * without compromising the main JVM * * These need to be orchestrated in a safe manner with a simple protocol. This @@ -37,7 +37,7 @@ import scala.collection.mutable trait RunnerOrchestration { /** The maximum amount of active runners, which contain a child JVM */ - def numberOfSlaves: Int + def numberOfWorkers: Int /** The maximum duration the child process is allowed to consume before * getting destroyed @@ -176,7 +176,7 @@ trait RunnerOrchestration { private val busyRunners = mutable.Set.empty[Runner] private def getRunner(): Runner = synchronized { - while (freeRunners.isEmpty && busyRunners.size >= numberOfSlaves) wait() + while (freeRunners.isEmpty && busyRunners.size >= numberOfWorkers) wait() val runner = if (freeRunners.isEmpty) new Runner(createProcess) diff --git a/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala b/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala index 0044ab8a94e5..df075e4fd634 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixMetaTests.scala @@ -25,7 +25,7 @@ class VulpixMetaTests { object VulpixMetaTests extends ParallelTesting { def maxDuration = 1.seconds // Ensure maximum reproducibility. - def numberOfSlaves = 1 + def numberOfWorkers = 1 def safeMode = false // Don't fork a new VM after each run test def isInteractive = false // Don't beautify output for interactive use. def testFilter = Nil // Run all the tests. diff --git a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala index 1aa76f445d15..1a9393d40d22 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixUnitTests.scala @@ -95,7 +95,7 @@ class VulpixUnitTests: object VulpixUnitTests extends ParallelTesting: import scala.concurrent.duration.* def maxDuration = 3.seconds - def numberOfSlaves = 5 + def numberOfWorkers = 5 def safeMode = sys.env.get("SAFEMODE").isDefined def isInteractive = !sys.env.contains("DOTTY_CI_RUN") def testFilter = Nil diff --git a/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala b/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala index 0f4eb633b770..f5b448481eab 100644 --- a/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala +++ b/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala @@ -19,7 +19,7 @@ class ScalaJSCompilationTests extends ParallelTesting { // Test suite configuration -------------------------------------------------- def maxDuration = 60.seconds - def numberOfSlaves = 5 + def numberOfWorkers = 5 def safeMode = Properties.testsSafeMode def isInteractive = SummaryReport.isInteractive def testFilter = Properties.testsFilter From 57e9cd7139eb0d79744e8d15b17dfe03548dce6a Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Sat, 15 Nov 2025 20:44:02 +0100 Subject: [PATCH 2/2] bugfix: Use numberOfWorkers instead [Cherry-picked b8fc7a095d12ad3c2e0d14b8f597ce661f573501][modified]