mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 07:41:02 +00:00
update tests to reflect recent changes around allowing things when
nodes are UNKNOWN
This commit is contained in:
parent
364888086b
commit
f7651e3a26
1 changed files with 10 additions and 2 deletions
|
|
@ -543,7 +543,11 @@ func TestClusteringNodesReplica1(t *testing.T) {
|
|||
Query: fmt.Sprintf("Row(%s=1)", fieldName),
|
||||
}
|
||||
|
||||
if _, err := cluster.GetPrimary().API.Query(context.Background(), qry); !strings.Contains(err.Error(), "shard unavailable") {
|
||||
// check for connection refused... this used to check 'shard
|
||||
// unavailable', but we since made a change to allow queries to
|
||||
// nodes which the cluster *thinks* are down, but often are
|
||||
// actually not.
|
||||
if _, err := cluster.GetPrimary().API.Query(context.Background(), qry); !strings.Contains(err.Error(), "connection refused") {
|
||||
t.Fatalf("got unexpected error querying an incomplete cluster: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
@ -636,7 +640,11 @@ func TestClusteringNodesReplica2(t *testing.T) {
|
|||
// the query to result in an error, we check that it's the error we expect.
|
||||
resp, err := coord.API.Query(context.Background(), qry)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "shard unavailable") {
|
||||
// check for connection refused... this used to check 'shard
|
||||
// unavailable', but we since made a change to allow queries to
|
||||
// nodes which the cluster *thinks* are down, but often are
|
||||
// actually not.
|
||||
if !strings.Contains(err.Error(), "connection refused") {
|
||||
t.Fatalf("got unexpected error querying an incomplete cluster: %v", err)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue