Robustifies check in TestCatalog_ListNodes_ConsistentRead_Fail test.

Fixes #3469
This commit is contained in:
James Phillips 2017-09-13 21:22:53 -07:00
parent 1680ef3210
commit 268018c558
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 2 additions and 1 deletions

View File

@ -809,7 +809,8 @@ func TestCatalog_ListNodes_ConsistentRead_Fail(t *testing.T) {
QueryOptions: structs.QueryOptions{RequireConsistent: true},
}
var out structs.IndexedNodes
if err := msgpackrpc.CallWithCodec(codec, "Catalog.ListNodes", &args, &out); !strings.HasPrefix(err.Error(), "leadership lost") {
err := msgpackrpc.CallWithCodec(codec, "Catalog.ListNodes", &args, &out)
if err == nil || !strings.HasPrefix(err.Error(), "leadership lost") {
t.Fatalf("err: %v", err)
}