From 5ffabe11482307d78e11a532feb7005b85ad75bd Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 28 Nov 2016 22:05:57 +0100 Subject: [PATCH] reduce time spent on kcp test --- transport/internet/kcp/kcp_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transport/internet/kcp/kcp_test.go b/transport/internet/kcp/kcp_test.go index d013d2ee..f7d50b47 100644 --- a/transport/internet/kcp/kcp_test.go +++ b/transport/internet/kcp/kcp_test.go @@ -92,7 +92,9 @@ func TestDialAndListen(t *testing.T) { } wg.Wait() - time.Sleep(20 * time.Second) + for i := 0; i < 60 && listerner.ActiveConnections() > 0; i++ { + time.Sleep(500 * time.Millisecond) + } assert.Int(listerner.ActiveConnections()).Equals(0) listerner.Close()