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

Fix compatibility tests #1268

Merged
merged 3 commits into from
May 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion async-nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "async-nats"
authors = ["Tomasz Pietrek <[email protected]>", "Casper Beyer <[email protected]>"]
version = "0.35.1"
edition = "2021"
rust = "1.67.0"
rust = "1.74.0"
description = "A async Rust NATS client"
license = "Apache-2.0"
documentation = "https://docs.rs/async-nats"
Expand Down
14 changes: 12 additions & 2 deletions async-nats/tests/compatibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ mod compatibility {
.init();
let url = std::env::var("NATS_URL").unwrap_or_else(|_| "localhost:4222".to_string());
tracing::info!("staring client for object store tests at {}", url);
let client = async_nats::connect(url).await.unwrap();
let client = async_nats::ConnectOptions::new()
.max_reconnects(10)
.retry_on_initial_connect()
.connect(&url)
.await
.unwrap();

let tests = client
.subscribe("tests.object-store.>")
Expand Down Expand Up @@ -422,7 +427,12 @@ mod compatibility {
async fn service_core() {
let url = std::env::var("NATS_URL").unwrap_or_else(|_| "localhost:4222".to_string());
tracing::info!("staring client for service tests at {}", url);
let client = async_nats::connect(url).await.unwrap();
let client = async_nats::ConnectOptions::new()
.max_reconnects(10)
.retry_on_initial_connect()
.connect(&url)
.await
.unwrap();

let mut tests = client
.subscribe("tests.service.core.>")
Expand Down
4 changes: 2 additions & 2 deletions async-nats/tests/configs/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rust:1.71.1
FROM rust:1.78
WORKDIR /usr/src/nats.rs/async-nats
ARG PROFILE=test
COPY . /usr/src/nats.rs
RUN cargo test --features compatibility_tests --no-run
ENV NATS_URL=localhost:4222
CMD cargo test --features compatibility_tests compatibility -- --nocapture
CMD cargo test --features compatibility_tests compatibility -- --nocapture
Loading