From 70eb8ef54660b62687bee98f4e93f2ac6c71ead5 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Mon, 5 Jan 2026 08:50:59 -0700 Subject: [PATCH] test(data-pipeline): handle EINTR in test_health_metrics_disabled Handle ErrorKind::Interrupted alongside WouldBlock/TimedOut when reading from socket. Signals can interrupt the blocking recvfrom() syscall, causing EINTR instead of timeout. Fixes intermittent CI test failure. --- libdd-data-pipeline/src/trace_exporter/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libdd-data-pipeline/src/trace_exporter/mod.rs b/libdd-data-pipeline/src/trace_exporter/mod.rs index 204d44300d..baec855df3 100644 --- a/libdd-data-pipeline/src/trace_exporter/mod.rs +++ b/libdd-data-pipeline/src/trace_exporter/mod.rs @@ -1464,10 +1464,13 @@ mod tests { } Err(e) if e.kind() == std::io::ErrorKind::WouldBlock - || e.kind() == std::io::ErrorKind::TimedOut => + || e.kind() == std::io::ErrorKind::TimedOut + || e.kind() == std::io::ErrorKind::Interrupted => { - // This is expected - no metrics should be sent when disabled - // WouldBlock on Unix, TimedOut on Windows + // This is expected - no metrics should be sent when disabled. + // WouldBlock on Unix, TimedOut on Windows. + // Interrupted can occur when signals interrupt the blocking + // recvfrom() syscall before the timeout expires. } Err(e) => panic!("Unexpected error reading from socket: {e}"), }