From 585958746ad4b0a136d03d5dbaf5ff0ce676faca Mon Sep 17 00:00:00 2001 From: James Phillips Date: Thu, 26 Jan 2017 22:22:18 -0800 Subject: [PATCH] Lets the leave unit test proceed even after an EOF. --- api/agent_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/agent_test.go b/api/agent_test.go index 984d927387..beaf26317d 100644 --- a/api/agent_test.go +++ b/api/agent_test.go @@ -1,6 +1,7 @@ package api import ( + "io" "io/ioutil" "strings" "testing" @@ -610,7 +611,9 @@ func TestAgent_Leave(t *testing.T) { t.Fatalf("err: %v", err) } - if err := c2.Agent().Leave(); err != nil { + // We sometimes see an EOF response to this one, depending on timing. + err := c2.Agent().Leave() + if err != nil && err != io.EOF { t.Fatalf("err: %v", err) }