test(xy): helper binaries for integration tests
This commit is contained in:
@@ -8,6 +8,14 @@ license.workspace = true
|
|||||||
name = "xy"
|
name = "xy"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "xy-test-sleep-server"
|
||||||
|
path = "src/bin/xy_test_sleep_server.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "xy-test-exit-failure"
|
||||||
|
path = "src/bin/xy_test_exit_failure.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
xy-protocol.workspace = true
|
xy-protocol.workspace = true
|
||||||
xy-supervisor.workspace = true
|
xy-supervisor.workspace = true
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
fn main() {
|
||||||
|
eprintln!("exit_failure dying immediately");
|
||||||
|
std::process::exit(7);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
fn main() {
|
||||||
|
use std::io::Write;
|
||||||
|
let pid = std::process::id();
|
||||||
|
eprintln!("sleep_server start pid={pid}");
|
||||||
|
println!("ready");
|
||||||
|
std::io::stdout().flush().ok();
|
||||||
|
loop {
|
||||||
|
std::thread::sleep(std::time::Duration::from_secs(60));
|
||||||
|
println!("tick");
|
||||||
|
std::io::stdout().flush().ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user