Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce test duration in AsynchronousTest #684

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tests/NimbleTests/AsynchronousTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {
}

func testWaitUntilWithCustomDefaultsTimeout() {
AsyncDefaults.Timeout = 5
AsyncDefaults.Timeout = 3
defer {
AsyncDefaults.Timeout = 1
}
waitUntil { done in
Thread.sleep(forTimeInterval: 4.8)
Thread.sleep(forTimeInterval: 2.8)
done()
}
}
Expand Down Expand Up @@ -121,7 +121,7 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {
let msg = "-waitUntil() timed out but was unable to run the timeout handler because the main thread is unresponsive (0.5 seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run."
failsWithErrorMessage(msg) {
waitUntil(timeout: 1) { done in
Thread.sleep(forTimeInterval: 5.0)
Thread.sleep(forTimeInterval: 3.0)
done()
}
}
Expand Down