Skip to content

Commit

Permalink
Increase allowed time for subscription setup in test013_suspendDevice…
Browse files Browse the repository at this point in the history
…s. (#35486)

3 seconds is often not enough time to set up a subscription in CI.  Make sure to
use a longer timeout in the places where we are expecting subscription setup.
  • Loading branch information
bzbarsky-apple authored Sep 9, 2024
1 parent 78830a0 commit 4aa1d59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

static const uint16_t kPairingTimeoutInSeconds = 10;
static const uint16_t kTimeoutInSeconds = 3;
static const uint16_t kSubscriptionTimeoutInSeconds = 60;
static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00";
static const uint16_t kTestVendorId = 0xFFF1u;
static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 30;
Expand Down Expand Up @@ -1690,8 +1691,8 @@ - (void)test013_suspendDevices
};

[device setDelegate:delegate queue:queue];
[self waitForExpectations:@[ initialReachableExpectation, initialSubscriptionExpectation ] timeout:60];
// Separately wait for the unreachable bit, so we don't end up waiting 60
[self waitForExpectations:@[ initialReachableExpectation, initialSubscriptionExpectation ] timeout:kSubscriptionTimeoutInSeconds];
// Separately wait for the unreachable bit, so we don't end up waiting kSubscriptionTimeoutInSeconds
// seconds for it.
[self waitForExpectations:@[ initialUnreachableExpectation ] timeout:0];

Expand Down Expand Up @@ -1737,7 +1738,7 @@ - (void)test013_suspendDevices
[controller resume];
XCTAssertFalse(controller.suspended);

[self waitForExpectations:@[ newSubscriptionExpectation, newReachableExpectation ] timeout:kTimeoutInSeconds];
[self waitForExpectations:@[ newSubscriptionExpectation, newReachableExpectation ] timeout:kSubscriptionTimeoutInSeconds];

// Test that sending a command works again. Clear the delegate's onReportEnd
// first, so reports from the command don't trigger it.
Expand Down

0 comments on commit 4aa1d59

Please sign in to comment.