diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index b2a85501ab1721..5c1d2b0c0e7e54 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -3075,7 +3075,7 @@ - (void)_pruneEndpointsIn:(MTRDeviceDataValueDictionary)previousPartsListValue // If the parts list changed and one or more endpoints were removed, remove all the // clusters for all those endpoints from our data structures. // Also remove those endpoints from the data store. - NSMutableSet * toBeRemovedEndpoints = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousPartsListValue]]; + NSMutableSet * toBeRemovedEndpoints = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousPartsListValue]]; NSSet * endpointsOnDevice = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:newPartsListValue]]; [toBeRemovedEndpoints minusSet:endpointsOnDevice]; @@ -3093,7 +3093,7 @@ - (void)_pruneEndpointsIn:(MTRDeviceDataValueDictionary)previousPartsListValue - (void)_pruneClustersIn:(MTRDeviceDataValueDictionary)previousServerListValue missingFrom:(MTRDeviceDataValueDictionary)newServerListValue - forEndpoint:(NSNumber *)endpointID + forEndpoint:(NSNumber *)endpointID { // If the server list changed and clusters were removed, remove those clusters from our data structures. // Also remove it from the data store. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm index 348574e2fb1330..8bff47315345d5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -726,8 +726,7 @@ - (void)clearStoredClusterDataForNodeID:(NSNumber *)nodeID endpointID:(NSNumber NSArray * clusterIndex = [self _fetchClusterIndexForNodeID:nodeID endpointID:endpointID]; - for (NSNumber * cluster in clusterIndex) - { + for (NSNumber * cluster in clusterIndex) { success = [self _deleteClusterDataForNodeID:nodeID endpointID:endpointID clusterID:cluster]; if (!success) { MTR_LOG_ERROR("Delete failed for clusterData for node 0x%016llX endpoint %u cluster 0x%08lX", nodeID.unsignedLongLongValue, endpointID.unsignedShortValue, cluster.unsignedLongValue); diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index e57df6428cee44..7c7c445f48faf4 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -35,7 +35,7 @@ static const uint16_t kTimeoutInSeconds = 3; static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; static const uint16_t kTestVendorId = 0xFFF1u; -//static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 10; +static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 10; @interface MTRPerControllerStorageTestsControllerDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @@ -2157,7 +2157,7 @@ - (void)testSetMRPParametersWithRunningController MTRSetMessageReliabilityParameters(nil, nil, nil, nil); } -/*static NSString * const kLocalTestUserDefaultDomain = @"org.csa-iot.matter.darwintest"; +static NSString * const kLocalTestUserDefaultDomain = @"org.csa-iot.matter.darwintest"; static NSString * const kLocalTestUserDefaultSubscriptionPoolSizeOverrideKey = @"subscriptionPoolSizeOverride"; // TODO: This might also want to go in a separate test file, with some shared setup for commissioning devices per test @@ -2300,7 +2300,7 @@ - (void)testSubscriptionPool [self doTestSubscriptionPoolWithSize:1 deviceOnboardingPayloads:deviceOnboardingPayloads]; [self doTestSubscriptionPoolWithSize:2 deviceOnboardingPayloads:deviceOnboardingPayloads]; } -}*/ +} - (MTRDevice *)getMTRDevice:(NSNumber *)deviceID { @@ -2674,7 +2674,6 @@ - (void)testDataStorageUpdatesWhenRemovingAttributes XCTAssertNotNil(testClusterDataValue); dispatch_sync(self->_storageQueue, ^{ - for (NSNumber * cluster in [controller.controllerDataStore _fetchClusterIndexForNodeID:deviceID endpointID:testEndpoint]) { // Make sure that the cluster data in the data storage is populated with cluster data for MTRClusterIDTypeIdentifyID cluster @@ -2740,7 +2739,6 @@ - (void)testDataStorageUpdatesWhenRemovingAttributes // and has all attributes except attribute 1 which was deleted. // We will page in the cluster data from storage to check the above. dispatch_sync(self->_storageQueue, ^{ - for (NSNumber * cluster in [controller.controllerDataStore _fetchClusterIndexForNodeID:deviceID endpointID:testEndpoint]) { MTRDeviceClusterData * clusterData = [controller.controllerDataStore _fetchClusterDataForNodeID:deviceID endpointID:testEndpoint clusterID:cluster]; XCTAssertNotNil(clusterData);