Test performance v2 - #2
Merged
Merged
Conversation
… cleanup Each test process now creates its own Postgres database (colonies_test_<pid>), so test packages no longer interfere with each other. The schema is created once per process and prefix; subsequent PrepareTests calls truncate all tables instead of dropping and recreating the schema, which is roughly an order of magnitude faster. Stale databases from finished or crashed runs are dropped opportunistically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…arallel Add utils.FreePorts, which asks the kernel for free ports, and use it in all server, controller, channel, and cluster test setups instead of the fixed TESTPORT and etcd/relay ports. Replace the shared /tmp/colonies directory with t.TempDir. Remove the now unused TESTPORT constant. Also poll WaitForProcessGraphs at 50 ms with a deadline instead of sleeping one second per attempt, and shorten an event-drain sleep in the realtime handler tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Config.Equals compared the matched-node counter against len(config.Nodes) twice, so the second operand never checked the other config's node count. Compare against len(config2.Nodes) as intended. Also flagged by go vet on newer Go toolchains. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the 41 serial per-package go test lines in the Makefile with one go test -race ./... run. Packages now run in parallel, which the per-process databases and dynamic ports make safe. The CI coverage run drops -p 1. github_test stays as an alias for CI. Constrain the wasm crypto library to js/wasm builds and delete the stale tests/smoke program, which no longer compiles; both otherwise break the single go test ./... invocation. tests/smoke was not built by the old per-package Makefile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The mock implemented the Controller interface but was never referenced by any test; the controller tests use createTestColoniesController and the DatabaseMock in the same file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
No description provided.