test(xy): helper binaries for integration tests

This commit is contained in:
2026-05-25 12:03:13 +02:00
parent c1f6225e26
commit 7107977637
3 changed files with 24 additions and 0 deletions
+8
View File
@@ -8,6 +8,14 @@ license.workspace = true
name = "xy"
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]
xy-protocol.workspace = true
xy-supervisor.workspace = true
@@ -0,0 +1,4 @@
fn main() {
eprintln!("exit_failure dying immediately");
std::process::exit(7);
}
+12
View File
@@ -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();
}
}