Skip to content

Commit

Permalink
Reduce parallelism on multi node setups, bring it back to 1 for singl…
Browse files Browse the repository at this point in the history
…e node
  • Loading branch information
slinkydeveloper committed Nov 7, 2024
1 parent 3c4705f commit 5d5b7da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/main/kotlin/dev/restate/sdktesting/junit/TestSuite.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ class TestSuite(
"junit.jupiter.execution.timeout.lifecycle.method.default", "360m")
}

// Reduce parallelism in three nodes setup
if (restateDeployerConfig.restateNodes > 1 && parallel) {
builder =
builder.configurationParameter(
"junit.jupiter.execution.parallel.config.dynamic.factor", "0.5")
}

val request = builder.build()

// Configure listeners
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/junit-platform.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ junit.jupiter.execution.parallel.mode.default=same_thread
# junit.jupiter.execution.parallel.mode.classes.default=concurrent
# Automatically adjust parallelism based on available cpu/processor cores
junit.jupiter.execution.parallel.config.strategy=dynamic
junit.jupiter.execution.parallel.config.dynamic.factor=0.8
junit.jupiter.execution.parallel.config.dynamic.factor=1

0 comments on commit 5d5b7da

Please sign in to comment.