Skip to content

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

Merged
derekcollison merged 1 commit intomainfrom
jnm/sourcing_wq_limit_tests
Mar 26, 2024
Merged

Adds tests for WQ stream sourcing with limit and discard new behavior#5112
derekcollison merged 1 commit intomainfrom
jnm/sourcing_wq_limit_tests

Conversation

@jnmoyne
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <jnmoyne@gmail.com>
@jnmoyne jnmoyne force-pushed the jnm/sourcing_wq_limit_tests branch from 1e25feb to 470dbda Compare March 25, 2024 20:54
@jnmoyne
Copy link
Copy Markdown
Contributor Author

jnmoyne commented Mar 25, 2024

Cleaned up the other test

Copy link
Copy Markdown
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
@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 <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.

3 participants