Skip to content

chore(coderd): fix test flake in TestAgentWebsocketMonitor_SendPings #11518

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

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jan 9, 2024

Fixes #11517

My read of the original issue is that m.lastPing can be stored in between

        fConn.requireEventuallyHasPing(t)

and

	lastPing := uut.lastPing.Load()

Triggering cancellation before checking lastPing should allow the for loop to complete its iteration through to storing lastPing.

@johnstcn johnstcn requested a review from spikecurtis January 9, 2024 16:48
@johnstcn johnstcn self-assigned this Jan 9, 2024
@johnstcn johnstcn merged commit 5ecb0db into main Jan 10, 2024
@johnstcn johnstcn deleted the cj/flake-testagentwebocketmonitor-sendpings branch January 10, 2024 08:45
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test flake: TestAgentWebsocketMonitor_SendPings
2 participants