fix flaky test panic (#12446)

This commit is contained in:
R.B. Boyer 2022-02-24 17:35:46 -06:00 committed by GitHub
parent 957146401e
commit ca112f8721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -156,6 +156,9 @@ func TestLeader_FailedMember(t *testing.T) {
if err != nil {
r.Fatalf("err: %v", err)
}
if len(checks) != 1 {
r.Fatalf("client missing check")
}
if got, want := checks[0].Status, api.HealthCritical; got != want {
r.Fatalf("got status %q want %q", got, want)
}
@ -703,6 +706,9 @@ func TestLeader_Reconcile_Races(t *testing.T) {
if err != nil {
r.Fatalf("err: %v", err)
}
if len(checks) != 1 {
r.Fatalf("client missing check")
}
if got, want := checks[0].Status, api.HealthCritical; got != want {
r.Fatalf("got state %q want %q", got, want)
}