mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
fix: Add timeouts to every tailnet ping (#4986)
A ping isn't guaranteed to deliver, so these need to have a tight timeout for tests to not flake.
This commit is contained in:
@ -179,6 +179,8 @@ func TestWorkspaceAgentListen(t *testing.T) {
|
||||
_ = conn.Close()
|
||||
}()
|
||||
require.Eventually(t, func() bool {
|
||||
ctx, cancelFunc := context.WithTimeout(ctx, testutil.IntervalFast)
|
||||
defer cancelFunc()
|
||||
_, err := conn.Ping(ctx)
|
||||
return err == nil
|
||||
}, testutil.WaitLong, testutil.IntervalFast)
|
||||
|
Reference in New Issue
Block a user