Tweaks the agent leave test to patch an occasional local failure.

This commit is contained in:
James Phillips 2017-03-22 09:56:53 -07:00
parent ab1b643630
commit 77fa58bd23
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 1 additions and 3 deletions

View File

@ -1,11 +1,9 @@
package api package api
import ( import (
"io"
"io/ioutil" "io/ioutil"
"strings" "strings"
"testing" "testing"
"time" "time"
"github.com/hashicorp/consul/testutil" "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. // We sometimes see an EOF response to this one, depending on timing.
err := c2.Agent().Leave() err := c2.Agent().Leave()
if err != nil && err != io.EOF { if err != nil && !strings.Contains(err.Error(), "EOF") {
t.Fatalf("err: %v", err) t.Fatalf("err: %v", err)
} }