feat(loadtest): Phase 2E — 5K-job / 4-worker end-to-end test - #5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2E: closes Phase 2 by proving the resume claim live.
internal/loadtestpackage,//go:build loadtest. Runs 5000 NoopHandler jobs through 4 workers (in-process goroutines), asserts wall clock < 15 s.testutilbuild tag widened tointegration || loadtestso the load test can use the same Postgres/Redis container helpers.make loadtesttarget.Latest local run: 5000 jobs / 4 workers in 2.04 s (2,454 jobs/s). Resume claim was "10s" — we're 5x faster.
What this exercises (per job × 5000): EnqueueJob + Push + BRPOP + ClaimJob + heartbeat goroutine + MarkDone. Plus polling loop. Real Postgres + Redis via testcontainers.
Phase 2 milestone complete: queue handles enqueue → claim → process → heartbeat → mark done, with sweeper-driven recovery for crashed workers and exponential-backoff retries for failed handlers.
Test plan