Remove a test-only method from base MTRDeviceController. (#35944)
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).
diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm
index 0bfe6f4..fb13db9 100644
--- a/src/darwin/Framework/CHIP/MTRDeviceController.mm
+++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm
@@ -441,18 +441,6 @@
}
}
-#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
{
diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm
index cae4103..47c373a 100644
--- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm
+++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm
@@ -1679,15 +1679,6 @@
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
/**