Tweaks the agent leave test to patch an occasional local failure.
This commit is contained in:
parent
ab1b643630
commit
77fa58bd23
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue