mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Attempt to fix a flakey call service test. (#4746)
This commit is contained in:
@@ -78,7 +78,7 @@ class ElementCallServiceTests: XCTestCase {
|
|||||||
XCTAssertTrue(!callProvider.reportNewIncomingCallWithUpdateCompletionCalled)
|
XCTAssertTrue(!callProvider.reportNewIncomingCallWithUpdateCompletionCalled)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testLifetimeIsCapped() async {
|
func testLifetimeIsCapped() async throws {
|
||||||
setupService()
|
setupService()
|
||||||
|
|
||||||
XCTAssertFalse(callProvider.reportNewIncomingCallWithUpdateCompletionCalled)
|
XCTAssertFalse(callProvider.reportNewIncomingCallWithUpdateCompletionCalled)
|
||||||
@@ -89,8 +89,9 @@ class ElementCallServiceTests: XCTestCase {
|
|||||||
didReceiveIncomingPushWith: pushPayload,
|
didReceiveIncomingPushWith: pushPayload,
|
||||||
for: .voIP) { }
|
for: .voIP) { }
|
||||||
|
|
||||||
// advance pass the max timeout but below the 300
|
// Advance past the max timeout but below the 300
|
||||||
await testClock.advance(by: .seconds(100))
|
await testClock.advance(by: .seconds(100))
|
||||||
|
try await Task.sleep(for: .milliseconds(100)) // Make sure there's time for the unanswered call to be reported.
|
||||||
|
|
||||||
// Call should have ended with unanswered
|
// Call should have ended with unanswered
|
||||||
XCTAssertTrue(callProvider.reportCallWithEndedAtReasonCalled)
|
XCTAssertTrue(callProvider.reportCallWithEndedAtReasonCalled)
|
||||||
|
|||||||
Reference in New Issue
Block a user