Skip to content

Commit

Permalink
Do not use 7777 port in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
  • Loading branch information
Jarema committed Nov 18, 2024
1 parent b5d0bdf commit 65c7f3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
env:
RUST_BACKTRACE: 1
run: |
nats-server --jetstream --port=4222 &
cargo test --features=${{ matrix.features }} --features slow_tests -- --nocapture
check_format:
Expand Down
8 changes: 4 additions & 4 deletions async-nats/tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,22 +785,22 @@ mod client {
#[tokio::test]
async fn retry_on_initial_connect() {
let _client = ConnectOptions::new()
.connect("localhost:7777")
.connect("localhost:7779")
.await
.expect_err("should fail to connect");
let client = ConnectOptions::new()
.event_callback(|ev| async move {
println!("event: {ev}");
})
.retry_on_initial_connect()
.connect("localhost:7777")
.connect("localhost:7779")
.await
.unwrap();

let mut sub = client.subscribe("DATA").await.unwrap();
client.publish("DATA", "payload".into()).await.unwrap();
tokio::time::sleep(Duration::from_secs(2)).await;
let _server = nats_server::run_server_with_port("", Some("7777"));
let _server = nats_server::run_server_with_port("", Some("7779"));
sub.next().await.unwrap();
}

Expand Down Expand Up @@ -922,7 +922,7 @@ mod client {
tx.send(event).unwrap();
}
})
.connect("localhost:7777")
.connect("localhost:7778")
.await
.unwrap();

Expand Down

0 comments on commit 65c7f3c

Please sign in to comment.