test(connect): restore subscriber readiness deadlines (#8285)

This commit is contained in:
Chris
2026-10-08 06:21:11 -07:00
committed by GitHub
parent 61b31e7b45
commit 371241afcb
+18 -10
View File
@@ -2426,11 +2426,15 @@ mod tests {
rustfs_credentials::set_global_rpc_secret("top-rpc-local-test-secret".to_owned()).unwrap();
let runtime = spawn_local_trace_capture_runtime(std::path::Path::new(&state), &stop).unwrap();
let emit = async {
// Executable hashing precedes subscription. The parent's bounded
// request and stdin cancellation govern this readiness wait.
while telemetry_trace_subscriber_count() == 0 {
tokio::task::yield_now().await;
}
// Hashing the CI test executable must finish before timing subscriber readiness.
super::super::job_delivery::executable_provenance().await.unwrap();
tokio::time::timeout(Duration::from_secs(10), async {
while telemetry_trace_subscriber_count() == 0 {
tokio::task::yield_now().await;
}
})
.await
.expect("top.rpc service subscriber");
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
let addr = listener.local_addr().unwrap();
let server = tokio::spawn(async move {
@@ -2569,11 +2573,15 @@ mod tests {
tokio::runtime::Runtime::new().unwrap().block_on(async {
let runtime = spawn_local_trace_capture_runtime(std::path::Path::new(&state), &stop).unwrap();
let emit = async {
// Executable hashing precedes subscription. The parent's bounded
// request and stdin cancellation govern this readiness wait.
while telemetry_trace_subscriber_count() == 0 {
tokio::task::yield_now().await;
}
// Hashing the CI test executable must finish before timing subscriber readiness.
super::super::job_delivery::executable_provenance().await.unwrap();
tokio::time::timeout(Duration::from_secs(10), async {
while telemetry_trace_subscriber_count() == 0 {
tokio::task::yield_now().await;
}
})
.await
.expect("top.api service subscriber");
for (operation, status) in [
(S3Operation::GetObject, 200),
(S3Operation::GetObject, 503),