Skip to content

Commit

Permalink
Increase test timeout (#2810)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1205237866452338/1207390952710955/f
Tech Design URL:
CC:

**Description**:
 Increase test timeout
  • Loading branch information
Bunn authored May 23, 2024
1 parent 8ab6aad commit 00c70b4
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ final class DataBrokerProtectionAgentStopperTests: XCTestCase {
let expectation = XCTestExpectation(description: "Wait for monitor")
stopper.monitorEntitlementAndStopAgentIfEntitlementIsInvalid(interval: 0.1)

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [self] in
XCTAssertFalse(mockStopAction.wasStopCalled)
expectation.fulfill()
}

wait(for: [expectation], timeout: 1)
wait(for: [expectation], timeout: 3)
}

func testEntitlementMonitorWithInValidResult_thenStopAgentIsCalled() {
Expand All @@ -166,12 +166,12 @@ final class DataBrokerProtectionAgentStopperTests: XCTestCase {
let expectation = XCTestExpectation(description: "Wait for monitor")
stopper.monitorEntitlementAndStopAgentIfEntitlementIsInvalid(interval: 0.1)

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [self] in
XCTAssertTrue(mockStopAction.wasStopCalled)
expectation.fulfill()
}

wait(for: [expectation], timeout: 1)
wait(for: [expectation], timeout: 3)
}

func testEntitlementMonitorWithErrorResult_thenStopAgentIsNotCalled() {
Expand All @@ -188,11 +188,11 @@ final class DataBrokerProtectionAgentStopperTests: XCTestCase {
let expectation = XCTestExpectation(description: "Wait for monitor")
stopper.monitorEntitlementAndStopAgentIfEntitlementIsInvalid(interval: 0.1)

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [self] in
XCTAssertFalse(mockStopAction.wasStopCalled)
expectation.fulfill()
}

wait(for: [expectation], timeout: 1)
wait(for: [expectation], timeout: 3)
}
}

0 comments on commit 00c70b4

Please sign in to comment.