@@ -3011,7 +3011,7 @@ - (void)test031_MTRDeviceAttributeCacheLocalTestStorage
3011
3011
// We need to remove the device here since the MTRDevice retains its reachable state. So if the next test needs to start with a clean state,
3012
3012
// it can't do that since the MTRDevice becomes reachable in the previous test. Since there are no changes detected in reachability,
3013
3013
// the onReachable callback to the delegate is not called.
3014
- // TODO: #33205 Ensure we have a clean slate w.r.t MTRDevice bfeore running each test.
3014
+ // TODO: #33205 Ensure we have a clean slate w.r.t MTRDevice before running each test.
3015
3015
[sController removeDevice:device];
3016
3016
}
3017
3017
@@ -3111,7 +3111,7 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
3111
3111
XCTAssertNotNil(data);
3112
3112
XCTAssertEqualObjects(data[MTRDataVersionKey], dataVersion);
3113
3113
3114
- NSArray<NSNumber *> * dataValue = data[MTRValueKey];
3114
+ id dataValue = data[MTRValueKey];
3115
3115
XCTAssertNotNil(dataValue);
3116
3116
XCTAssertNotNil(testDataValue);
3117
3117
XCTAssertEqualObjects(dataValue, testDataValue);
@@ -3320,9 +3320,9 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
3320
3320
}
3321
3321
} ];
3322
3322
3323
- // Test attribute path - endpointId = 0, clusterId = descriptor, attributeId = server list.
3324
3323
[MTRDeviceTests checkAttributeReportTriggersConfigurationChanged:MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID clusterId:MTRClusterIDTypeDescriptorID endpointId:@(0) device:device delegate:delegate dataVersion:dataVersionForDeviceTypesList attributeReport:attributeReport testcase:self expectConfigurationChanged:YES];
3325
3324
3325
+ // Test attribute path - endpointId = 0, clusterId = descriptor, attributeId = server list.
3326
3326
dataVersionForServerList = [NSNumber numberWithUnsignedLongLong:(dataVersionForServerList.unsignedLongLongValue + 1)];
3327
3327
attributeReport = @[ @{
3328
3328
MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID)],
@@ -3466,10 +3466,9 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
3466
3466
[device unitTestInjectAttributeReport:attributeReport];
3467
3467
[self waitForExpectations:@[ gotAttributeReportWithMultipleAttributesExpectation, gotAttributeReportWithMultipleAttributesEndExpectation, deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes ] timeout:kTimeoutInSeconds];
3468
3468
3469
- // We need to remove the device here since the MTRDevice retains its reachable state. So if the next test needs to start with a clean state,
3470
- // it can't do that since the MTRDevice becomes reachable in the previous test. Since there are no changes detected in reachability,
3471
- // the onReachable callback to the delegate is not called.
3472
- // TODO: #33205 Ensure we have a clean slate w.r.t MTRDevice bfeore running each test.
3469
+ // We need to remove the device here, because we injected data into its attribute cache
3470
+ // that does not match the actual server.
3471
+ // TODO: #33205 Ensure we have a clean slate w.r.t MTRDevice before running each test.
3473
3472
[sController removeDevice:device];
3474
3473
}
3475
3474
0 commit comments