Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tests for WQ stream sourcing with limit and discard new behavior #5112

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

jnmoyne
Copy link
Contributor

@jnmoyne jnmoyne commented Feb 21, 2024

Adds a test to check the existing behavior: when creating a WQ stream that sources from another stream and has a max messages limit and has discard policy new. The stream should never go over the limit but should still get all the messages in the stream being sourced (i.e. getting more messages as they are consumed from the WQ stream).

@jnmoyne jnmoyne requested a review from a team as a code owner February 21, 2024 08:43
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.

Minor stylistic things but otherwise looks OK to me.

@jnmoyne
Copy link
Contributor Author

jnmoyne commented Mar 4, 2024

Requested changes were done. Is it good now?

@jnmoyne jnmoyne force-pushed the jnm/sourcing_wq_limit_tests branch 3 times, most recently from 66cc368 to a30c818 Compare March 25, 2024 18:21
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.

Couple of the if err != nil { require_NoError(...) } in TestJetStreamSourceWorkingQueueWithLimit are superfluous but not actually harmful, otherwise LGTM.

…r stream and has a max messages limit and has discard policy new. The stream should never go over the limit but should still get all the messages in the stream being sourced (i.e. getting more messages as they are consumed from the WQ stream)

Signed-off-by: Jean-Noël Moyne <[email protected]>
@jnmoyne jnmoyne force-pushed the jnm/sourcing_wq_limit_tests branch from 1e25feb to 470dbda Compare March 25, 2024 20:54
@jnmoyne
Copy link
Contributor Author

jnmoyne commented Mar 25, 2024

Cleaned up the other test

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

@derekcollison derekcollison merged commit 1ec96d9 into main Mar 26, 2024
4 checks passed
@derekcollison derekcollison deleted the jnm/sourcing_wq_limit_tests branch March 26, 2024 17:50
derekcollison added a commit that referenced this pull request Apr 4, 2024
Cherry-pick the following PRs into the v2.10.14 release branch:

* #5237
* #5238
* #5242
* #5208
* #5244
* #5248
* #5246
* #5112
* #5247
* #5256
* #5258
* #5264
* #5266
* #5267
* #5265
* #5271
* #5270
* #5272
* #5276
* #5274
* #5275
* #5277
* #5279

Signed-off-by: Neil Twigg <[email protected]>
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.

3 participants