Skip to content

Commit

Permalink
t - shorten timeout failure test to 0.4 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed May 7, 2024
1 parent 740f54c commit ecc2a99
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ final class ExpectToEventuallyEqualTests: XCTestCase {
try expectToEventuallyEqual(
actual: { changeling.tryAgain(returning: "never", after: 15) },
expected: "eventually",
timeout: 0.4,
fail: failSpy.fail
)

XCTAssertEqual(failSpy.callCount, 1, "fail call count")
XCTAssertTrue(failSpy.message.hasPrefix("Expected \"eventually\", but was \"never\" after "), failSpy.message)
XCTAssertTrue(failSpy.message.hasSuffix(" tries, timing out after 1.0 seconds"), failSpy.message)
XCTAssertTrue(failSpy.message.hasSuffix(" tries, timing out after 0.4 seconds"), failSpy.message)
XCTAssertEqual(failSpy.file.hasSuffix("/ExpectToEventuallyEqualTests.swift"), true, "file")
XCTAssertEqual(failSpy.line, 26, "line")
}
Expand Down

0 comments on commit ecc2a99

Please sign in to comment.