aboutsummaryrefslogtreecommitdiff
path: root/connection_handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'connection_handler_test.go')
-rw-r--r--connection_handler_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/connection_handler_test.go b/connection_handler_test.go
index 85aee0c..aefa058 100644
--- a/connection_handler_test.go
+++ b/connection_handler_test.go
@@ -154,8 +154,14 @@ func TestConnectionFactory(t *testing.T) {
go testInteraction(serverClientNetFlow, serverClientTransportFlow, otherSeenChan, completed)
}
+ timeout := time.Tick(1 * time.Second)
for i := 0; i < n; i++ {
- <-completed
+ select {
+ case <- completed:
+ continue
+ case <- timeout:
+ t.Fatal("timeout")
+ }
}
assert.Len(t, factory.connections, 0)