From 3f3889022e73b7fa1a19b14a69d5e3634e70a523 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 22 Mar 2017 09:56:53 -0700 Subject: [PATCH] Tweaks the agent leave test to patch an occasional local failure. --- api/agent_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/agent_test.go b/api/agent_test.go index beaf26317d..2096eb477c 100644 --- a/api/agent_test.go +++ b/api/agent_test.go @@ -1,11 +1,9 @@ package api import ( - "io" "io/ioutil" "strings" "testing" - "time" "github.com/hashicorp/consul/testutil" @@ -613,7 +611,7 @@ func TestAgent_Leave(t *testing.T) { // We sometimes see an EOF response to this one, depending on timing. err := c2.Agent().Leave() - if err != nil && err != io.EOF { + if err != nil && !strings.Contains(err.Error(), "EOF") { t.Fatalf("err: %v", err) }