Skip to content

Commit

Permalink
Fix flaky vtgate test TestInconsistentStateDetectedBuffering (#13560)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitess-bot[bot] committed Jul 20, 2023
1 parent 227e66e commit f1d2b8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/vtgate/tabletgateway_flaky_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,11 @@ func TestInconsistentStateDetectedBuffering(t *testing.T) {
case <-queryChan:
require.Nil(t, res)
require.Error(t, err)
require.Equal(t, "target: ks1.-80.primary: inconsistent state detected, primary is serving but initially found no available tablet", err.Error())
// depending on whether the health check ticks before or after the buffering code, we might get different errors
if !(err.Error() == "target: ks1.-80.primary: inconsistent state detected, primary is serving but initially found no available tablet" ||
err.Error() == "target: ks1.-80.primary: no healthy tablet available for 'keyspace:\"ks1\" shard:\"-80\" tablet_type:PRIMARY'") {
t.Fatalf("wrong error returned: %v", err)
}
case <-time.After(15 * time.Second):
t.Fatalf("timed out waiting for query to execute")
}
Expand Down

0 comments on commit f1d2b8b

Please sign in to comment.