Skip to content

Commit

Permalink
Add test for push consumer config with sample freq
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Sparks <[email protected]>
  • Loading branch information
bengsparks and Benjamin Sparks authored Jan 2, 2025
1 parent db5ab8d commit 95e5f2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,7 @@ mod jetstream {
.await
.unwrap();

// Pull Consumer
{
let consumer = stream
.create_consumer(consumer::pull::Config {
Expand All @@ -2602,10 +2603,12 @@ mod jetstream {
assert_eq!(100, consumer.cached_info().config.sample_frequency);
}

// Push Consumer
{
let consumer = stream
.create_consumer(consumer::pull::Config {
.create_consumer(consumer::push::Config {
name: Some("SampledPushConsumer".into()),
deliver_subject: "DeliverSubject".into(),
description: Some(
"See below to check that Ack Sampling has been set to 100%!".to_string(),
),
Expand Down

0 comments on commit 95e5f2e

Please sign in to comment.