From b2921986fc251d44a533a1f0801e38ef79365972 Mon Sep 17 00:00:00 2001 From: SendableMetatype <263203301+SendableMetatype@users.noreply.github.com> Date: Sat, 22 Aug 2026 20:46:58 +0200 Subject: [PATCH] test: give the DTMF completion wait more headroom RTCDtmfSenderTests waits one second for a tone sequence to complete. The longest sequence in the suite needs 720 ms of tone time, and timer scheduling plus the JNI callback add about 240 ms on top, so the bound leaves almost no margin and ordinary scheduling jitter is enough to cross it. The Intel macOS lane hit this twice in a row. The latch returns when the sequence completes, so a five second bound costs nothing when the test passes. --- .../src/test/java/dev/onvoid/webrtc/RTCDtmfSenderTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webrtc/src/test/java/dev/onvoid/webrtc/RTCDtmfSenderTests.java b/webrtc/src/test/java/dev/onvoid/webrtc/RTCDtmfSenderTests.java index 47d59e3d..d8e352ba 100644 --- a/webrtc/src/test/java/dev/onvoid/webrtc/RTCDtmfSenderTests.java +++ b/webrtc/src/test/java/dev/onvoid/webrtc/RTCDtmfSenderTests.java @@ -70,7 +70,11 @@ void waitUntilCompleted() throws InterruptedException { } boolean awaitCompletion() throws InterruptedException { - return completedLatch.await(1, TimeUnit.SECONDS); + // The longest sequence in these tests needs 720 ms of tone time, + // and timer scheduling plus the callback add about 240 ms, which + // leaves one second almost no margin. The latch returns when the + // sequence completes, so a five second bound costs nothing on a pass. + return completedLatch.await(5, TimeUnit.SECONDS); } }