From 63f2f51614b170fa64df704c5e5279c60f58d2ca Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Mon, 8 Jul 2024 23:14:09 +0200 Subject: [PATCH] Fix typo --- relay/client/manager_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/relay/client/manager_test.go b/relay/client/manager_test.go index 360cc62f5..e32170b92 100644 --- a/relay/client/manager_test.go +++ b/relay/client/manager_test.go @@ -145,8 +145,10 @@ func TestForeginConnClose(t *testing.T) { mCtx, cancel := context.WithCancel(ctx) defer cancel() mgr := NewManager(mCtx, toURL(srvCfg1), idAlice) - mgr.Serve() - + err := mgr.Serve() + if err != nil { + t.Fatalf("failed to serve manager: %s", err) + } conn, err := mgr.OpenConn(toURL(srvCfg2), "anotherpeer", nil) if err != nil { t.Fatalf("failed to bind channel: %s", err) @@ -203,13 +205,16 @@ func TestForeginAutoClose(t *testing.T) { }() // wait for servers to start - time.Sleep(300 * time.Second) + time.Sleep(300 * time.Millisecond) idAlice := "alice" t.Log("connect to server 1.") mCtx, cancel := context.WithCancel(ctx) defer cancel() mgr := NewManager(mCtx, toURL(srvCfg1), idAlice) - mgr.Serve() + err := mgr.Serve() + if err != nil { + t.Fatalf("failed to serve manager: %s", err) + } t.Log("open connection to another peer") conn, err := mgr.OpenConn(toURL(srvCfg2), "anotherpeer", nil)