Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to fix flaky TestGetRoundTripper* tests (#4738)
## Which problem is this PR solving? - Resolves #4732 ## Description of the changes - Introduces an atomic boolean outside of the HTTP test handler and only set to `true` if the expected request is received. - This should prevent cases where unrelated processes are hitting the same test URL. ## How was this change tested? - Ran `make test` to pass. - Ran `go test -tags=memory_storage_integration -count 10 ./...` and confirmed `metricsstore` tests are passing. - Note that a number of unrelated tests were failing with the `-count 10` flag set, **not as a result of the changes from this PR**, namely: ``` --- FAIL: TestFactory (0.00s) --- FAIL: TestFactory/#00 (0.00s) panic: Reuse of exported var name: test_1694287567920905000_counter_x [recovered] panic: Reuse of exported var name: test_1694287567920905000_counter_x ``` and ``` --- FAIL: TestPublishOpts (0.00s) builder_test.go:308: Error Trace: /Users/albertteoh/go/src/github.com/albertteoh/jaeger/cmd/agent/app/builder_test.go:308 Error: Received unexpected error: cannot create processors: cannot create Thrift Processor: cannot create UDP Server: cannot create UDPServerTransport: listen udp :5775: bind: address already in use Test: TestPublishOpts ``` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Albert Teoh <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Albert Teoh <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
- Loading branch information