Skip to content

Commit

Permalink
Fix timeout in MTRSwiftPairingTests. (#35636)
Browse files Browse the repository at this point in the history
3 seconds is not enough time to do commissioning, sometimes.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Oct 30, 2024
1 parent d29cff1 commit 5416609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ struct PairingConstants {
static let onboardingPayload = "MT:-24J0AFN00KA0648G00"
static let deviceID = 0x12344321
static let timeoutInSeconds : UInt16 = 3
static let pairingTimeoutInSeconds : UInt16 = 60
}

class MTRSwiftPairingTestControllerDelegate : NSObject, MTRDeviceControllerDelegate {
Expand Down Expand Up @@ -96,7 +97,7 @@ class MTRSwiftPairingTests : XCTestCase {
return
}

wait(for: [expectation], timeout: TimeInterval(PairingConstants.timeoutInSeconds))
wait(for: [expectation], timeout: TimeInterval(PairingConstants.pairingTimeoutInSeconds))

ResetCommissionee(MTRBaseDevice(nodeID: PairingConstants.deviceID as NSNumber, controller: controller), DispatchQueue.main, self, PairingConstants.timeoutInSeconds)

Expand Down

0 comments on commit 5416609

Please sign in to comment.