Skip to content

Commit

Permalink
Fix domain resolution issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoscout committed Jan 3, 2020
1 parent 77684f8 commit 825f0e0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
26 changes: 22 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "wait"
version = "2.7.1"
version = "2.7.2"
authors = ["ufoscout <[email protected]>"]
edition = "2018"

[dependencies]
port_check = "0.1.3"
port_check = "0.1.4"

[dev-dependencies]
atomic-counter = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FROM alpine
ADD MySuperApp.sh /MySuperApp.sh

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

## Launch the wait tool and then your application
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ pub fn wait(
while !port_check::is_port_reachable_with_timeout(
&host
.trim()
.to_string()
.parse()
.expect("The host IP should be valid"),
.to_string(),
Duration::from_secs(config.tcp_connection_timeout),
) {
println!("Host {} not yet available...", host);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn should_exit_on_timeout() {
let timeout = 25;
let wait_before = 30;
let wait_after = 300;
let hosts = format!("127.0.0.1:{}", free_port());
let hosts = format!("localhost:{}", free_port());
let start = Instant::now();
let mut sleeper = MillisSleeper::default();

Expand Down

0 comments on commit 825f0e0

Please sign in to comment.