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

Use jetstream strict for tests #1310

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions async-nats/tests/configs/jetstream.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
jetstream: {
strict: true,
max_mem_store: 64MiB,
max_file_store: 10GiB
}
2 changes: 1 addition & 1 deletion async-nats/tests/configs/jetstream_hub.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server_name: HUB
jetstream: { domain: HUB }
jetstream: { strict: true, domain: HUB }
leafnodes { listen: 127.0.0.1:7422 }
2 changes: 1 addition & 1 deletion async-nats/tests/configs/jetstream_leaf.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server_name: LEAF
jetstream: { domain:LEAF }
jetstream: { strict: true, domain:LEAF }
leafnodes {
remotes = [ { url: "leaf://127.0.0.1:7422" } ]
}
9 changes: 7 additions & 2 deletions async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3260,7 +3260,10 @@ mod jetstream {
.await
.unwrap();

assert_eq!(stream.info().await.unwrap().config.metadata, metadata);
let mut stream_metadata = stream.info().await.unwrap().config.metadata.clone();
stream_metadata.retain(|k, _| !k.contains("_"));

assert_eq!(metadata, stream_metadata);

let mut consumer = stream
.create_consumer(async_nats::jetstream::consumer::pull::Config {
Expand All @@ -3271,7 +3274,9 @@ mod jetstream {
.await
.unwrap();

assert_eq!(consumer.info().await.unwrap().config.metadata, metadata);
let mut consumer_metadata = consumer.info().await.unwrap().config.metadata.clone();
consumer_metadata.retain(|k, _| !k.contains("_"));
assert_eq!(metadata, consumer_metadata);
}

#[tokio::test]
Expand Down
1 change: 1 addition & 0 deletions nats-server/configs/jetstream.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
jetstream: {
strict: true,
max_mem_store: 8MiB,
max_file_store: 10GiB
}