From 1e177d3b7f20435e34beaa5e96c88729c2e87c22 Mon Sep 17 00:00:00 2001 From: Andre Kazmierczak Date: Tue, 17 Dec 2024 19:58:41 +0100 Subject: [PATCH] fix(tests): raise timeouts slightly --- Sources/Tests/HIDEventDispatcherTests.swift | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Sources/Tests/HIDEventDispatcherTests.swift b/Sources/Tests/HIDEventDispatcherTests.swift index a474dba..cb8c0f1 100644 --- a/Sources/Tests/HIDEventDispatcherTests.swift +++ b/Sources/Tests/HIDEventDispatcherTests.swift @@ -31,14 +31,11 @@ import Testing observedPrequisites.append(prequisite) } } - try? await Task.sleep(seconds: 0.5) - eventSource.raise( - eventOfType: .tapDisabledByTimeout, - event: .init(keyboardEventSource: nil, virtualKey: 16, keyDown: false)! - ) - try? await Task.sleep(seconds: 0.5) + try? await Task.sleep(seconds: 0.75) + try? await Task.sleep(seconds: 0.75) let latestValues = observedPrequisites.suffix(2) - #expect(latestValues.first?.contains(.enabled) == false && latestValues.last?.contains(.enabled) == true) + #expect(latestValues.first?.contains(.enabled) == false) + #expect(latestValues.last?.contains(.enabled) == true) receiver.remove() observationTask.cancel() }