Skip to content

Commit

Permalink
fix(ios): fix crash in unit tests;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed Feb 21, 2024
1 parent 8610430 commit 9b02925
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/Shared/Webhook/WebhookManager.test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class WebhookManagerTests: XCTestCase {
sendDidFinishEvents(for: manager.currentBackgroundSessionInfo)
}

func testBackgroundHandlingForExtensionCallsAppropriateCompletionHandler() {
func testBackgroundHandlingForExtensionCallsAppropriateCompletionHandler() throws {
let mainIdentifier = manager.currentBackgroundSessionInfo.identifier
let testIdentifier = manager.currentBackgroundSessionInfo.identifier + "-test" + UUID().uuidString

Expand Down Expand Up @@ -105,9 +105,10 @@ class WebhookManagerTests: XCTestCase {
XCTAssertNoThrow(try hang(mainPromise))
XCTAssertNoThrow(try hang(testPromise))

let underlyingQueue = try XCTUnwrap(manager.currentBackgroundSessionInfo.session.delegateQueue.underlyingQueue)
// for the clearing of session infos
waitRunLoop(
queue: manager.currentBackgroundSessionInfo.session.delegateQueue.underlyingQueue!,
queue: underlyingQueue,
count: 2
)

Expand Down

0 comments on commit 9b02925

Please sign in to comment.