Skip to content

Commit 24a4581

Browse files
committed
Uncomment subscription pool tests
1 parent e00746c commit 24a4581

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/darwin/Framework/CHIP/MTRDevice.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -3075,7 +3075,7 @@ - (void)_pruneEndpointsIn:(MTRDeviceDataValueDictionary)previousPartsListValue
30753075
// If the parts list changed and one or more endpoints were removed, remove all the
30763076
// clusters for all those endpoints from our data structures.
30773077
// Also remove those endpoints from the data store.
3078-
NSMutableSet<NSNumber*> * toBeRemovedEndpoints = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousPartsListValue]];
3078+
NSMutableSet<NSNumber *> * toBeRemovedEndpoints = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousPartsListValue]];
30793079
NSSet<NSNumber *> * endpointsOnDevice = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:newPartsListValue]];
30803080
[toBeRemovedEndpoints minusSet:endpointsOnDevice];
30813081

@@ -3093,7 +3093,7 @@ - (void)_pruneEndpointsIn:(MTRDeviceDataValueDictionary)previousPartsListValue
30933093

30943094
- (void)_pruneClustersIn:(MTRDeviceDataValueDictionary)previousServerListValue
30953095
missingFrom:(MTRDeviceDataValueDictionary)newServerListValue
3096-
forEndpoint:(NSNumber *)endpointID
3096+
forEndpoint:(NSNumber *)endpointID
30973097
{
30983098
// If the server list changed and clusters were removed, remove those clusters from our data structures.
30993099
// Also remove it from the data store.

src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm

+1-2
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,7 @@ - (void)clearStoredClusterDataForNodeID:(NSNumber *)nodeID endpointID:(NSNumber
726726

727727
NSArray<NSNumber *> * clusterIndex = [self _fetchClusterIndexForNodeID:nodeID endpointID:endpointID];
728728

729-
for (NSNumber * cluster in clusterIndex)
730-
{
729+
for (NSNumber * cluster in clusterIndex) {
731730
success = [self _deleteClusterDataForNodeID:nodeID endpointID:endpointID clusterID:cluster];
732731
if (!success) {
733732
MTR_LOG_ERROR("Delete failed for clusterData for node 0x%016llX endpoint %u cluster 0x%08lX", nodeID.unsignedLongLongValue, endpointID.unsignedShortValue, cluster.unsignedLongValue);

src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
static const uint16_t kTimeoutInSeconds = 3;
3636
static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00";
3737
static const uint16_t kTestVendorId = 0xFFF1u;
38-
//static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 10;
38+
static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 10;
3939

4040
@interface MTRPerControllerStorageTestsControllerDelegate : NSObject <MTRDeviceControllerDelegate>
4141
@property (nonatomic, strong) XCTestExpectation * expectation;
@@ -2157,7 +2157,7 @@ - (void)testSetMRPParametersWithRunningController
21572157
MTRSetMessageReliabilityParameters(nil, nil, nil, nil);
21582158
}
21592159

2160-
/*static NSString * const kLocalTestUserDefaultDomain = @"org.csa-iot.matter.darwintest";
2160+
static NSString * const kLocalTestUserDefaultDomain = @"org.csa-iot.matter.darwintest";
21612161
static NSString * const kLocalTestUserDefaultSubscriptionPoolSizeOverrideKey = @"subscriptionPoolSizeOverride";
21622162

21632163
// 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
23002300
[self doTestSubscriptionPoolWithSize:1 deviceOnboardingPayloads:deviceOnboardingPayloads];
23012301
[self doTestSubscriptionPoolWithSize:2 deviceOnboardingPayloads:deviceOnboardingPayloads];
23022302
}
2303-
}*/
2303+
}
23042304

23052305
- (MTRDevice *)getMTRDevice:(NSNumber *)deviceID
23062306
{
@@ -2674,7 +2674,6 @@ - (void)testDataStorageUpdatesWhenRemovingAttributes
26742674
XCTAssertNotNil(testClusterDataValue);
26752675

26762676
dispatch_sync(self->_storageQueue, ^{
2677-
26782677
for (NSNumber * cluster in [controller.controllerDataStore _fetchClusterIndexForNodeID:deviceID endpointID:testEndpoint]) {
26792678

26802679
// Make sure that the cluster data in the data storage is populated with cluster data for MTRClusterIDTypeIdentifyID cluster
@@ -2740,7 +2739,6 @@ - (void)testDataStorageUpdatesWhenRemovingAttributes
27402739
// and has all attributes except attribute 1 which was deleted.
27412740
// We will page in the cluster data from storage to check the above.
27422741
dispatch_sync(self->_storageQueue, ^{
2743-
27442742
for (NSNumber * cluster in [controller.controllerDataStore _fetchClusterIndexForNodeID:deviceID endpointID:testEndpoint]) {
27452743
MTRDeviceClusterData * clusterData = [controller.controllerDataStore _fetchClusterDataForNodeID:deviceID endpointID:testEndpoint clusterID:cluster];
27462744
XCTAssertNotNil(clusterData);

0 commit comments

Comments
 (0)