Skip to content

Commit

Permalink
Fix pull_fetch test
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <[email protected]>
  • Loading branch information
Jarema committed Feb 24, 2023
1 parent 9d04586 commit 5ad3cf2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1739,13 +1739,17 @@ mod jetstream {
context
.publish("events".to_string(), "dat".into())
.await
.unwrap()
.await
.unwrap();
}

let mut iter = consumer.fetch().max_messages(100).messages().await.unwrap();

let mut i = 0;
while (iter.next().await).is_some() {
while let Some(message) = iter.next().await {
let message = message.unwrap();
message.ack().await.unwrap();
i += 1;
}
assert_eq!(i, 10);
Expand Down Expand Up @@ -2635,6 +2639,7 @@ mod jetstream {
std::io::ErrorKind::NotFound
);
}

#[tokio::test]
async fn multiple_filters_consumer() {
let server = nats_server::run_server("tests/configs/jetstream.conf");
Expand Down

0 comments on commit 5ad3cf2

Please sign in to comment.