Skip to content

Commit 825f0e0

Browse files
committed
Fix domain resolution issue
1 parent 77684f8 commit 825f0e0

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

Cargo.lock

+22-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "wait"
3-
version = "2.7.1"
3+
version = "2.7.2"
44
authors = ["ufoscout <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
port_check = "0.1.3"
8+
port_check = "0.1.4"
99

1010
[dev-dependencies]
1111
atomic-counter = "1.0"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM alpine
1919
ADD MySuperApp.sh /MySuperApp.sh
2020

2121
## Add the wait script to the image
22-
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.1/wait /wait
22+
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.2/wait /wait
2323
RUN chmod +x /wait
2424

2525
## Launch the wait tool and then your application

src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ pub fn wait(
6262
while !port_check::is_port_reachable_with_timeout(
6363
&host
6464
.trim()
65-
.to_string()
66-
.parse()
67-
.expect("The host IP should be valid"),
65+
.to_string(),
6866
Duration::from_secs(config.tcp_connection_timeout),
6967
) {
7068
println!("Host {} not yet available...", host);

tests/integration_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fn should_exit_on_timeout() {
7474
let timeout = 25;
7575
let wait_before = 30;
7676
let wait_after = 300;
77-
let hosts = format!("127.0.0.1:{}", free_port());
77+
let hosts = format!("localhost:{}", free_port());
7878
let start = Instant::now();
7979
let mut sleeper = MillisSleeper::default();
8080

0 commit comments

Comments
 (0)