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

feat:add check port before start sqlness test #1895

Merged
merged 6 commits into from Jul 12, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/runner/src/env.rs
Expand Up @@ -183,6 +183,13 @@ impl Env {
_ => panic!("Unexpected subcommand: {subcommand}"),
};

if util::check_port(check_ip_addr.parse().unwrap(), Duration::from_secs(1)).await {
waynexia marked this conversation as resolved.
Show resolved Hide resolved
panic!(
"Port {check_ip_addr} is already in use, please check and retry.",
check_ip_addr = check_ip_addr
);
}

let mut process = Command::new("./greptime")
.current_dir(util::get_binary_dir("debug"))
.args(args)
Expand Down