Skip to content

chore: split e2e tests for real-time output#152

Merged
tnsardesai merged 1 commit intomainfrom
chore/split-e2e-test-output
Feb 12, 2026
Merged

chore: split e2e tests for real-time output#152
tnsardesai merged 1 commit intomainfrom
chore/split-e2e-test-output

Conversation

@tnsardesai
Copy link
Contributor

@tnsardesai tnsardesai commented Feb 12, 2026

Summary

  • Split make test so e2e tests run as a separate go test invocation instead of bundled in go test ./...
  • Unit tests still run together (fast, ~2s total)
  • E2e tests run alone with a banner message before they start

Why

go test ./... buffers each package's output until the package completes. Since e2e tests take ~2 minutes (testcontainers), the terminal shows nothing for that entire duration — it looks like the tests are hung.

Running e2e as a separate go test ./e2e/ invocation makes it the only active package, so output (container startup, health checks, test progress) streams in real time.

There's no way to disable per-package buffering in go test when running multiple packages in parallel — it's intentional to prevent interleaved output. The -p 1 flag would work but slows down the overall run which is why it was removed #137. The split approach gives real-time streaming where it matters (e2e) with no performance cost.

Test plan

  • make test passes (all unit + e2e tests green)
  • E2e output streams in real time after the banner
  • Unit tests still run in parallel as before

🤖 Generated with Claude Code


Note

Low Risk
Makefile-only change that alters test execution ordering/invocation but not production code; main risk is accidentally excluding/duplicating packages due to the go list | grep -v /e2e$ filter.

Overview
make test now runs non-e2e packages first and executes ./e2e tests as a separate go test step, with a banner printed before the e2e run to make progress/logs visible while testcontainers start up.

Written by Cursor Bugbot for commit 310bc74. This will update automatically on new commits. Configure here.

@tnsardesai tnsardesai marked this pull request as ready for review February 12, 2026 00:11
`go test ./...` buffers each package's output until the package completes.
Since e2e tests take ~2 minutes (testcontainers), nothing is visible until
they all finish. Running e2e as a separate `go test` invocation makes it
the only active package, so output streams in real time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tnsardesai tnsardesai force-pushed the chore/split-e2e-test-output branch from 20e9496 to 310bc74 Compare February 12, 2026 00:13
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

go vet ./...
# E2E tests use dynamic ports via TestContainer, enabling parallel execution
go test -v -race ./...
go test -v -race $$(go list ./... | grep -v /e2e$$)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filtered package list can fail test target

Low Severity

go test -v -race $$(go list ./... | grep -v /e2e$$) depends on grep -v returning matches. If every listed package is filtered out, grep exits non-zero and make test stops before running ./e2e/, even though tests may be valid. This introduces a brittle failure mode in server/Makefile.

Fix in Cursor Fix in Web

@tnsardesai tnsardesai merged commit 3ed0d70 into main Feb 12, 2026
5 checks passed
@tnsardesai tnsardesai deleted the chore/split-e2e-test-output branch February 12, 2026 22:48
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