diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 6023685f2214d2..51d936981f2350 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -959,6 +959,7 @@ - (BOOL)_deviceUsesThread #ifdef DEBUG id testDelegate = _weakDelegate.strongObject; if (testDelegate) { + // Note: This is a hack to allow our unit tests to test the subscription pooling behavior we have implemented for thread, so we mock devices to be a thread device if ([testDelegate respondsToSelector:@selector(unitTestPretendThreadEnabled:)]) { if ([testDelegate unitTestPretendThreadEnabled:self]) { return YES;