Skip to content

Commit

Permalink
Merge #100115
Browse files Browse the repository at this point in the history
100115: server: deflake TestStatusEngineStatsJson r=adityamaru a=knz

Fixes #95491.

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
  • Loading branch information
craig[bot] and knz committed Mar 31, 2023
2 parents dc4b25b + 78d8117 commit 27c7beb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/server/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,14 @@ func TestStatusEngineStatsJson(t *testing.T) {
defer s.Stopper().Stop(context.Background())

var engineStats serverpb.EngineStatsResponse
if err := getStatusJSONProto(s, "enginestats/local", &engineStats); err != nil {
t.Fatal(err)
}
// Using SucceedsSoon because we have seen in the wild that
// occasionally requests don't go through with error "transport:
// error while dialing: connection interrupted (did the remote node
// shut down or are there networking issues?)"
testutils.SucceedsSoon(t, func() error {
return getStatusJSONProto(s, "enginestats/local", &engineStats)
})

if len(engineStats.Stats) != 1 {
t.Fatal(errors.Errorf("expected one engine stats, got: %v", engineStats))
}
Expand Down

0 comments on commit 27c7beb

Please sign in to comment.