Skip to content

Commit 1988801

Browse files
committed
Added comment and removed redundant virtual thread starvation test
1 parent 78b7d3a commit 1988801

4 files changed

Lines changed: 3 additions & 68 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
USER: unittest
148148
TEMPORAL_SERVICE_ADDRESS: localhost:7233
149149
USE_EXTERNAL_SERVICE: true
150-
run: ./gradlew --no-daemon :temporal-sdk:virtualThreadTests :temporal-sdk:virtualThreadStarvationTests -x spotlessCheck -x spotlessApply -x spotlessJava -PtestJavaVersion=21
150+
run: ./gradlew --no-daemon :temporal-sdk:virtualThreadTests -x spotlessCheck -x spotlessApply -x spotlessJava -PtestJavaVersion=21
151151

152152
- name: Publish Test Report
153153
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6

temporal-sdk/build.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -256,23 +256,6 @@ testing {
256256
}
257257
}
258258

259-
virtualThreadStarvationTests(JvmTestSuite) {
260-
targets {
261-
all {
262-
testTask.configure {
263-
jvmArgs '-Djdk.virtualThreadScheduler.parallelism=1',
264-
'-Djdk.virtualThreadScheduler.maxPoolSize=1'
265-
if (project.hasProperty("testJavaVersion")) {
266-
javaLauncher = javaToolchains.launcherFor {
267-
languageVersion = JavaLanguageVersion.of(project.property("testJavaVersion") as int)
268-
}
269-
}
270-
shouldRunAfter(virtualThreadTests)
271-
}
272-
}
273-
}
274-
}
275-
276259
// Run the same test as the normal test task with virtual threads
277260
testsWithVirtualThreads(JvmTestSuite) {
278261
// Use the same source and resources as the main test set
@@ -304,5 +287,4 @@ testing {
304287
tasks.named('check') {
305288
dependsOn(testing.suites.jackson3Tests)
306289
dependsOn(testing.suites.virtualThreadTests)
307-
dependsOn(testing.suites.virtualThreadStarvationTests)
308290
}

temporal-sdk/src/test/java/io/temporal/internal/sync/DeterministicRunnerTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ public void testThreadStarvationBeforeWorkflowThreadStarts() throws InterruptedE
842842
() -> fail("workflow code should not start while the executor thread is occupied"));
843843

844844
try {
845+
// Try starting the root workflow thread, but it won't run because the executor is tied up.
846+
// We should detect this and throw a PotentialDeadlockException.
845847
PotentialDeadlockException e =
846848
Assert.assertThrows(
847849
PotentialDeadlockException.class, () -> runner.runUntilAllBlocked(10));

temporal-sdk/src/virtualThreadStarvationTests/java/io/temporal/internal/sync/ThreadStarvationVirtualThreadTest.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)