From b8fc7a095d12ad3c2e0d14b8f597ce661f573501 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Tue, 4 Nov 2025 16:49:43 +0100 Subject: [PATCH] bugfix: Use numberOfWorkers instead --- compiler/test/dotc/comptest.scala | 2 +- compiler/test/dotty/tools/debug/DebugTests.scala | 2 +- compiler/test/dotty/tools/dotc/BestEffortOptionsTests.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 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/compiler/test/dotc/comptest.scala b/compiler/test/dotc/comptest.scala index d79ebad4a00d..a38a293ab92b 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/debug/DebugTests.scala b/compiler/test/dotty/tools/debug/DebugTests.scala index faeff76adc09..3d2f0b0cfefe 100644 --- a/compiler/test/dotty/tools/debug/DebugTests.scala +++ b/compiler/test/dotty/tools/debug/DebugTests.scala @@ -25,7 +25,7 @@ object DebugTests extends ParallelTesting: def maxDuration = // Increase the timeout when the user is debugging the tests if isUserDebugging then 3.hours else 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/BestEffortOptionsTests.scala b/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala index 038ca914fb5f..9adf678e2355 100644 --- a/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala +++ b/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala @@ -42,7 +42,7 @@ class BestEffortOptionsTests { object BestEffortOptionsTests extends ParallelTesting { 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/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 0b0fb1e172af..0735d65511d1 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -219,7 +219,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 8626d823aa4f..fa8239b99c29 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -380,7 +380,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 1b0f999c4f84..d7fff4b0e848 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 1d8f6597e4ff..49a5c52310ae 100644 --- a/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala +++ b/compiler/test/dotty/tools/dotc/TastyBootstrapTests.scala @@ -109,7 +109,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 2aa811abd75c..cd16d3d536a1 100644 --- a/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala +++ b/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala @@ -132,7 +132,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 a91b0de3e238..df4d692175f9 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -16,7 +16,7 @@ import scala.concurrent.ExecutionContext.Implicits.global import scala.collection.mutable import scala.compiletime.uninitialized -/** 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 @@ -38,7 +38,7 @@ import scala.compiletime.uninitialized 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 @@ -215,7 +215,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 eaa071c487c2..70cc680399b1 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 fe9136635fd4..382c4d6ffb28 100644 --- a/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala +++ b/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala @@ -39,7 +39,7 @@ object 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