mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 08:56:43 +00:00
Robustifies check in TestCatalog_ListNodes_ConsistentRead_Fail test.
Fixes #3469
This commit is contained in:
parent
42a6c9f13e
commit
d84c0b1a01
@ -809,7 +809,8 @@ func TestCatalog_ListNodes_ConsistentRead_Fail(t *testing.T) {
|
|||||||
QueryOptions: structs.QueryOptions{RequireConsistent: true},
|
QueryOptions: structs.QueryOptions{RequireConsistent: true},
|
||||||
}
|
}
|
||||||
var out structs.IndexedNodes
|
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)
|
t.Fatalf("err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user