Skip to content

Commit 95e5f2e

Browse files
authored
Add test for push consumer config with sample freq
Co-authored-by: Benjamin Sparks <b.sparks@alugha.com>
1 parent db5ab8d commit 95e5f2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

async-nats/tests/jetstream_tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,7 @@ mod jetstream {
25862586
.await
25872587
.unwrap();
25882588

2589+
// Pull Consumer
25892590
{
25902591
let consumer = stream
25912592
.create_consumer(consumer::pull::Config {
@@ -2602,10 +2603,12 @@ mod jetstream {
26022603
assert_eq!(100, consumer.cached_info().config.sample_frequency);
26032604
}
26042605

2606+
// Push Consumer
26052607
{
26062608
let consumer = stream
2607-
.create_consumer(consumer::pull::Config {
2609+
.create_consumer(consumer::push::Config {
26082610
name: Some("SampledPushConsumer".into()),
2611+
deliver_subject: "DeliverSubject".into(),
26092612
description: Some(
26102613
"See below to check that Ack Sampling has been set to 100%!".to_string(),
26112614
),

0 commit comments

Comments
 (0)