Skip to content

Commit 946366a

Browse files
Remove racy Darwin test. (#33594)
We are going to change how the estimated latency is computed anyway, at which point this test will no longer be valid.
1 parent 849c5df commit 946366a

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m

-11
Original file line numberDiff line numberDiff line change
@@ -1452,12 +1452,9 @@ - (void)doDataStoreMTRDeviceTestWithStorageDelegate:(id<MTRDeviceControllerStora
14521452
// datastore) the device has no estimate for subscription latency.
14531453
XCTAssertNil(device.estimatedSubscriptionLatency);
14541454

1455-
__auto_type * beforeSetDelegate = [NSDate now];
1456-
14571455
[device setDelegate:delegate queue:queue];
14581456

14591457
[self waitForExpectations:@[ subscriptionExpectation ] timeout:60];
1460-
__auto_type * afterInitialSubscription = [NSDate now];
14611458

14621459
if (!disableStorageBehaviorOptimization) {
14631460
[self waitForExpectations:@[ gotClusterDataPersisted ] timeout:60];
@@ -1504,14 +1501,6 @@ - (void)doDataStoreMTRDeviceTestWithStorageDelegate:(id<MTRDeviceControllerStora
15041501
// some time.
15051502
XCTAssertGreaterThan(device.estimatedSubscriptionLatency.doubleValue, 0);
15061503

1507-
// Check that this estimate is no larger than the measured latency observed
1508-
// above. Unfortunately, We measure our observed latency to report end, not
1509-
// to the immediately following internal subscription established
1510-
// notification, so in fact our measured value can end up shorter than the
1511-
// estimated latency the device has. Add some slop to handle that.
1512-
const NSTimeInterval timingSlopInSeconds = 0.5;
1513-
XCTAssertLessThanOrEqual(device.estimatedSubscriptionLatency.doubleValue, [afterInitialSubscription timeIntervalSinceDate:beforeSetDelegate] + timingSlopInSeconds);
1514-
15151504
// Now set up new delegate for the new device and verify that once subscription reestablishes, the data version filter loaded from storage will work
15161505
__auto_type * newDelegate = [[MTRDeviceTestDelegate alloc] init];
15171506

0 commit comments

Comments
 (0)