chore: update testutil chan helpers (#17408)

This commit is contained in:
ケイラ
2025-04-16 10:37:09 -06:00
committed by GitHub
parent 2a76f5028e
commit f670bc31f5
45 changed files with 582 additions and 559 deletions
+3 -3
View File
@@ -780,7 +780,7 @@ func TestWorkspaceProxyDERPMeshProbe(t *testing.T) {
require.NoError(t, err, "failed to force proxy to re-register")
// Wait for the ping to fail.
replicaErr := testutil.RequireRecvCtx(ctx, t, replicaPingErr)
replicaErr := testutil.TryReceive(ctx, t, replicaPingErr)
require.NotEmpty(t, replicaErr, "replica ping error")
// GET /healthz-report
@@ -858,7 +858,7 @@ func TestWorkspaceProxyDERPMeshProbe(t *testing.T) {
// Wait for the ping to fail.
for {
replicaErr := testutil.RequireRecvCtx(ctx, t, replicaPingErr)
replicaErr := testutil.TryReceive(ctx, t, replicaPingErr)
t.Log("replica ping error:", replicaErr)
if replicaErr != "" {
break
@@ -892,7 +892,7 @@ func TestWorkspaceProxyDERPMeshProbe(t *testing.T) {
// Wait for the ping to be skipped.
for {
replicaErr := testutil.RequireRecvCtx(ctx, t, replicaPingErr)
replicaErr := testutil.TryReceive(ctx, t, replicaPingErr)
t.Log("replica ping error:", replicaErr)
// Should be empty because there are no more peers. This was where
// the regression was.