Skip to content

Comments

De-flake TestJetStreamBackOffCheckPending#7686

Merged
neilalexander merged 1 commit intomainfrom
maurice/deflake-pending
Jan 1, 2026
Merged

De-flake TestJetStreamBackOffCheckPending#7686
neilalexander merged 1 commit intomainfrom
maurice/deflake-pending

Conversation

@MauriceVanVeen
Copy link
Member

TestJetStreamBackOffCheckPending could flake since checkPending can run either 2 or 3 times depending on timing. o.resetPtmr(250ms) is called, and o.trackPending shortly after when the redelivery happens. If checkPending runs normally there will be 2 invocations to FastState, however if checkPending ran a few microseconds earlier (when compared with the o.trackPending call not the initial delay call), this will schedule checkPending to run again after minimal delay (to ensure the next redelivery is properly scheduled after the full delay), but that would mean 3 invocations which made the test fail.

The test was originally added to ensure checkPending has awareness of backoff and does not run too often. This test would fail with 10+ invocations without that, so this test actually needed to be updated. Also updated o.trackPending to ensure the timer and pending data use the same 'now' time.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner December 30, 2025 21:01
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit bcf0bb5 into main Jan 1, 2026
90 of 92 checks passed
@neilalexander neilalexander deleted the maurice/deflake-pending branch January 1, 2026 12:12
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7565
- #7589
- #7600
- #7602
- #7609
- #7610
- #7632
- #7649
- #7642
- #7658
- #7659
- #7661
- #7662
- #7663
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7698
- #7699
- #7700

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7658
- #7659
- #7661
- #7662
- #7663
- #7642
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7697
- #7698
- #7699
- #7700

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants