Lets the leave unit test proceed even after an EOF.

This commit is contained in:
James Phillips 2017-01-26 22:22:18 -08:00
parent dcff5137f9
commit 585958746a
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 4 additions and 1 deletions

View File

@ -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)
}