File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/signal-handling-tests-helper
Tests/SignalHandlingTests Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import SignalHandling
99struct 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 )
Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments