Skip to content

Commit e05d60e

Browse files
committed
Fix a test
1 parent 4d7d4c3 commit e05d60e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/signal-handling-tests-helper/ConditionLock.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import SignalHandling
99
struct ConditionLock : ParsableCommand {
1010

1111
func run() throws {
12+
/* The terminated signal is _not_ Ctrl-C… */
1213
try Sigaction(handler: .ansiC({ _ in ConditionLock.exit() })).install(on: .terminated)
1314

1415
NSConditionLock(condition: 0).lock(whenCondition: 1)

Tests/SignalHandlingTests/LockTest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ final class NSConditionLockTest : XCTestCase {
1818

1919
try p.run()
2020

21-
Thread.sleep(forTimeInterval: 0.125) /* We wait a little bit to let the helper test have the time to crash */
21+
Thread.sleep(forTimeInterval: 0.750) /* Depending on context 0.25s can be enough, or more than 0.5s might be needed… */
2222
p.terminate()
23-
Thread.sleep(forTimeInterval: 0.125) /* We wait a little bit to let the helper test process the signal and quit */
23+
Thread.sleep(forTimeInterval: 0.125) /* We wait a little bit to let the helper test process the signal and quit. */
2424

2525
XCTAssertEqual(p.terminationStatus, 0)
2626
XCTAssertEqual(p.terminationReason, .exit)

0 commit comments

Comments
 (0)