From f49501995bac6a3b7c01834fc979698ad74a59ee Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 6 May 2025 13:54:20 +0300 Subject: [PATCH 1/2] test(agent/agentssh): fix channel timeout in TestNewServer_CloseActiveConnections --- agent/agentssh/agentssh_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/agentssh/agentssh_test.go b/agent/agentssh/agentssh_test.go index ae1aaa92f2ffd..2f75ae5ae39da 100644 --- a/agent/agentssh/agentssh_test.go +++ b/agent/agentssh/agentssh_test.go @@ -214,7 +214,7 @@ func TestNewServer_CloseActiveConnections(t *testing.T) { } for _, ch := range waitConns { - <-ch + testutil.RequireReceive(ctx, t, ch) } return s, wg.Wait From 026b63ef17c0c9b0a8c1b781a7bcf2473bcd6fd8 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 6 May 2025 14:09:55 +0300 Subject: [PATCH 2/2] receive does not support closed ch --- agent/agentssh/agentssh_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/agentssh/agentssh_test.go b/agent/agentssh/agentssh_test.go index 2f75ae5ae39da..23d9dcc7da3b7 100644 --- a/agent/agentssh/agentssh_test.go +++ b/agent/agentssh/agentssh_test.go @@ -214,7 +214,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) { } for _, ch := range waitConns { - testutil.RequireReceive(ctx, t, ch) + select { + case <-ctx.Done(): + t.Fatal("timeout") + case <-ch: + } } return s, wg.Wait pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy