Skip to content

Commit

Permalink
De-flake TestJetStreamConsumerDecrementPendingCountOnSkippedMsg (#6330)
Browse files Browse the repository at this point in the history
Could take some time for `o.processStreamSignal` to be called and up
`o.npc`. Without would sometimes fail with `jetstream_test.go:24773:
require int64 equal, but got: 0 != 1`.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
  • Loading branch information
derekcollison authored and MauriceVanVeen committed Jan 9, 2025
1 parent 9300bbe commit 7ead834
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/jetstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23018,6 +23018,7 @@ func TestJetStreamConsumerDontDecrementPendingCountOnSkippedMsg(t *testing.T) {
o := mset.lookupConsumer("CONSUMER")

requireExpected := func(expected int64) {
t.Helper()
checkFor(t, time.Second, 10*time.Millisecond, func() error {
o.mu.RLock()
npc := o.npc
Expand Down

0 comments on commit 7ead834

Please # to comment.