Skip to content

Run concurrent dev server starts as parallel subtests#1026

Open
highlyavailable wants to merge 1 commit into
temporalio:mainfrom
highlyavailable:fix-concurrent-starts-test
Open

Run concurrent dev server starts as parallel subtests#1026
highlyavailable wants to merge 1 commit into
temporalio:mainfrom
highlyavailable:fix-concurrent-starts-test

Conversation

@highlyavailable
Copy link
Copy Markdown

@highlyavailable highlyavailable commented May 16, 2026

TestServer_StartDev_ConcurrentStarts spawned its worker goroutines by hand and called the testify require helpers from inside them, both directly and through the test harness. require calls t.FailNow, which Go only allows from the goroutine running the test, so any failure it hit was reported unreliably.

Each instance now runs as a parallel subtest with its own *testing.T, so the assertions run on a goroutine where FailNow is valid. A buffered channel caps concurrency at 8, same as before.

While verifying with -race, the corrected test surfaced a real data race in initCommand: concurrent Execute() calls read and write the global color.NoColor from fatih/color. That looks like the actual flakiness this test was meant to catch. It's a separate production bug so I've left it out of this PR and filed it as #1027.

Refs #581

TestServer_StartDev_ConcurrentStarts spawned its worker goroutines by
hand and called the require helpers (and the harness, which wraps them)
from inside those goroutines. testify's require helpers call t.FailNow,
which Go only permits from the goroutine running the test, so any
failure it reported was unreliable and masked the real cause.

Each instance now runs as a parallel subtest with its own *testing.T,
so the require helpers run on a goroutine where FailNow is valid. A
buffered channel caps concurrency at 8, matching the original intent.
@highlyavailable highlyavailable requested a review from a team as a code owner May 16, 2026 02:16
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 16, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants