Skip to content

Commit

Permalink
cr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Gump9 committed Jul 12, 2023
1 parent d8ee38f commit 89ff9b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/runner/src/env.rs
Expand Up @@ -190,7 +190,7 @@ impl Env {
);
}

let process = Command::new("./greptime")
let mut process = Command::new("./greptime")
.current_dir(util::get_binary_dir("debug"))
.args(args)
.stdout(log_file)
Expand All @@ -199,6 +199,11 @@ impl Env {
panic!("Failed to start the DB with subcommand {subcommand},Error: {error}")
});

if !util::check_port(check_ip_addr.parse().unwrap(), Duration::from_secs(10)).await {
Env::stop_server(&mut process);
panic!("{subcommand} doesn't up in 10 seconds, quit.")
}

process
}

Expand Down

0 comments on commit 89ff9b7

Please sign in to comment.