Skip to content

Extract workers test helpers into internal/workertest#372

Closed
lilydoar wants to merge 1 commit into
lilydoar/stack/5from
lilydoar/stack/6
Closed

Extract workers test helpers into internal/workertest#372
lilydoar wants to merge 1 commit into
lilydoar/stack/5from
lilydoar/stack/6

Conversation

@lilydoar
Copy link
Copy Markdown
Contributor

@lilydoar lilydoar commented May 28, 2026

Stacked PRs:


Extract workers test helpers into internal/workertest

workers/test_env.go, test_workers.go, and test_historyrequire.go were
package workers (production) files: the test_ prefix is not special to Go
(only _test.go is excluded from builds), so this test-support code compiled
into the shipped binary and forced production-only edges from package workers
into loadgen/devserver/versions that only the test harness needs.

Move them to a dedicated internal/workertest package (env.go, workerpool.go,
historyrequire.go). The helpers reference a few production symbols (Builder,
Runner, BaseDir, and the previously-unexported logWriter), so export logWriter
as LogWriter with a NewLogWriter constructor and qualify the rest. Update the
consumers (loadgen and scenario tests) to import internal/workertest.

Testing: go build ./... and go vet ./... pass; the loadgen and scenario
test packages compile against the new import path.

@lilydoar lilydoar requested review from a team as code owners May 28, 2026 21:54
workers/test_env.go, test_workers.go, and test_historyrequire.go were
package workers (production) files: the test_ prefix is not special to Go
(only _test.go is excluded from builds), so this test-support code compiled
into the shipped binary and forced production-only edges from package workers
into loadgen/devserver/versions that only the test harness needs.

Move them to a dedicated internal/workertest package (env.go, workerpool.go,
historyrequire.go). The helpers reference a few production symbols (Builder,
Runner, BaseDir, and the previously-unexported logWriter), so export logWriter
as LogWriter with a NewLogWriter constructor and qualify the rest. Update the
consumers (loadgen and scenario tests) to import internal/workertest.

Testing: `go build ./...` and `go vet ./...` pass; the loadgen and scenario
test packages compile against the new import path.

stack-info: PR: #372, branch: lilydoar/stack/6
@lilydoar lilydoar force-pushed the lilydoar/stack/5 branch from 2ca480a to ba97ed4 Compare May 28, 2026 21:54
@lilydoar lilydoar force-pushed the lilydoar/stack/6 branch from f3d8da2 to 74aa52b Compare May 28, 2026 21:54
lilydoar added a commit that referenced this pull request May 29, 2026
workers/test_env.go, test_workers.go, and test_historyrequire.go were
package workers (production) files: the test_ prefix is not special to Go
(only _test.go is excluded from builds), so this test-support code compiled
into the shipped binary and forced production-only edges from package workers
into loadgen/devserver/versions that only the test harness needs.

Move them to a dedicated internal/workertest package (env.go, workerpool.go,
historyrequire.go). The helpers reference a few production symbols (Builder,
Runner, BaseDir, and the previously-unexported logWriter), so export logWriter
as LogWriter with a NewLogWriter constructor and qualify the rest. Update the
consumers (loadgen and scenario tests) to import internal/workertest.

Testing: `go build ./...` and `go vet ./...` pass; the loadgen and scenario
test packages compile against the new import path.

stack-info: PR: #372, branch: lilydoar/stack/6
@lilydoar
Copy link
Copy Markdown
Contributor Author

Closing — the module-organization stack was rebased (devserver move dropped, since devserver must stay exported for temporal to import it). Recreating the stack fresh.

@lilydoar lilydoar closed this May 29, 2026
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.

1 participant