Repository navigation
discovery/consul: run tests in parallel - #18611
Merged
krajorama merged 1 commit intoMay 19, 2026
Merged
Conversation
10 of 17 tasks
Each test creates its own httptest.Server and prometheus.Registry so there is no shared global state between them. Adding t.Parallel() to all 13 top-level test functions and the subtests in TestUnmarshalConfig allows the Go test runner to overlap them, cutting wall-clock time. Refs: prometheus#15185 Signed-off-by: Ogulcan Aydogan <[email protected]>
ogulcanaydogan
force-pushed
the
chore/consul-parallel-tests
branch
from
May 6, 2026 14:13
677bf53 to
fce1ba0
Compare
mrvarmazyar
approved these changes
May 10, 2026
Member
|
Hello from the bug scrub! Merged based on code owner review. |
This was referenced May 19, 2026
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.
Refs #15185
All 13 top-level test functions in
discovery/consul/consul_test.gocreatetheir own
httptest.Serverandprometheus.Registry, so there is no sharedglobal state between them. Adding
t.Parallel()to each top-level test andto the four subtests inside
TestUnmarshalConfigallows the Go test runnerto overlap them.
No existing PR covers this package (confirmed with
gh pr list --search "discovery/consul").Testing:
go test -race -count=1 ./discovery/consul/...— pass.