Skip to content

Commit

Permalink
Remove a test-only method from base MTRDeviceController. (#35944)
Browse files Browse the repository at this point in the history
This is only used with concrete controllers from tests, and is already
implemented by MTRDeviceController_Concrete.

Also removes a test-only class method from MTRDeviceController_Concrete that
MTRDeviceController already implements (and has to keep implementing, since the
tests use it on MTRDeviceController itself, not an instance).
  • Loading branch information
bzbarsky-apple authored Oct 8, 2024
1 parent 6ced852 commit 9ccc52e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
12 changes: 0 additions & 12 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -441,18 +441,6 @@ - (void)removeDevice:(MTRDevice *)device
}
}

#ifdef DEBUG
- (NSDictionary<NSNumber *, NSNumber *> *)unitTestGetDeviceAttributeCounts
{
std::lock_guard lock(*self.deviceMapLock);
NSMutableDictionary<NSNumber *, NSNumber *> * deviceAttributeCounts = [NSMutableDictionary dictionary];
for (NSNumber * nodeID in _nodeIDToDeviceMap) {
deviceAttributeCounts[nodeID] = @([[_nodeIDToDeviceMap objectForKey:nodeID] unitTestAttributeCount]);
}
return deviceAttributeCounts;
}
#endif

- (BOOL)setOperationalCertificateIssuer:(nullable id<MTROperationalCertificateIssuer>)operationalCertificateIssuer
queue:(nullable dispatch_queue_t)queue
{
Expand Down
9 changes: 0 additions & 9 deletions src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1679,15 +1679,6 @@ - (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID att
return nil;
}

#ifdef DEBUG
+ (void)forceLocalhostAdvertisingOnly
{
auto interfaceIndex = chip::Inet::InterfaceId::PlatformType(kDNSServiceInterfaceIndexLocalOnly);
auto interfaceId = chip::Inet::InterfaceId(interfaceIndex);
chip::app::DnssdServer::Instance().SetInterfaceId(interfaceId);
}
#endif // DEBUG

@end

/**
Expand Down

0 comments on commit 9ccc52e

Please sign in to comment.