Skip to content

Commit

Permalink
De-flake TestJetStreamNextMsgNoInterest (#6334)
Browse files Browse the repository at this point in the history
Ack state could take some time to propagate, since the sent acks are not
synchronous.

Signed-off-by: Maurice van Veen <[email protected]>
  • Loading branch information
derekcollison authored Jan 7, 2025
2 parents 0153091 + b302af9 commit ddaedb1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/jetstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8540,10 +8540,14 @@ func TestJetStreamNextMsgNoInterest(t *testing.T) {
}
}
nc.Flush()
ostate := o.info()
if ostate.AckFloor.Stream != 11 || ostate.NumAckPending > 0 {
t.Fatalf("Inconsistent ack state: %+v", ostate)
}

checkFor(t, time.Second, 10*time.Millisecond, func() error {
ostate := o.info()
if ostate.AckFloor.Stream != 11 || ostate.NumAckPending > 0 {
return fmt.Errorf("Inconsistent ack state: %+v", ostate)
}
return nil
})
})
}
}
Expand Down

0 comments on commit ddaedb1

Please sign in to comment.