Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flakiness of graceful termination test #1250

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

josephschorr
Copy link
Member

@josephschorr josephschorr commented Apr 4, 2023

Appeared to be a race condition

Stress output:

$ stress ./server.test -test.run=TestServerGracefulTermination -test.cpu=2 -test.timeout=5s 5s: 951 runs so far, 0 failures
10s: 1992 runs so far, 0 failures
15s: 3071 runs so far, 0 failures
20s: 4134 runs so far, 0 failures
25s: 5159 runs so far, 0 failures
30s: 6215 runs so far, 0 failures

Fixes #1236

@josephschorr josephschorr requested a review from a team as a code owner April 4, 2023 21:45
@github-actions github-actions bot added area/CLI Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Apr 4, 2023
WithHTTPGateway(util.HTTPServerConfig{Enabled: true}),
WithDashboardAPI(util.HTTPServerConfig{Enabled: true}),
WithMetricsAPI(util.HTTPServerConfig{Enabled: true}),
WithHTTPGateway(util.HTTPServerConfig{Enabled: true, Address: fmt.Sprintf("localhost:%d", ports[0])}),
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just do Address: ":" and it should pick a free port

Appeared to be a race condition

Stress output:

$ stress ./server.test -test.run=TestServerGracefulTermination -test.cpu=2 -test.timeout=5s
5s: 951 runs so far, 0 failures
10s: 1992 runs so far, 0 failures
15s: 3071 runs so far, 0 failures
20s: 4134 runs so far, 0 failures
25s: 5159 runs so far, 0 failures
30s: 6215 runs so far, 0 failures

Fixes authzed#1236
@ecordell ecordell enabled auto-merge April 4, 2023 22:03
@ecordell ecordell merged commit 0d762a1 into authzed:main Apr 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2023
@josephschorr josephschorr deleted the graceful-flake branch April 4, 2023 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Flake: TestServerGracefulTermination
3 participants