File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 56
56
57
57
#include < app-common/zap-generated/cluster-objects.h>
58
58
#include < app/data-model/List.h>
59
+ #include < app/server/Dnssd.h>
59
60
#include < controller/CHIPDeviceController.h>
60
61
#include < controller/CHIPDeviceControllerFactory.h>
61
62
#include < controller/CommissioningWindowOpener.h>
62
63
#include < credentials/FabricTable.h>
63
64
#include < credentials/GroupDataProvider.h>
64
65
#include < credentials/attestation_verifier/DacOnlyPartialAttestationVerifier.h>
65
66
#include < credentials/attestation_verifier/DefaultDeviceAttestationVerifier.h>
67
+ #include < inet/InetInterface.h>
66
68
#include < lib/core/CHIPVendorIdentifiers.hpp>
67
69
#include < platform/LockTracker.h>
68
70
#include < platform/PlatformManager.h>
69
71
#include < setup_payload/ManualSetupPayloadGenerator.h>
70
72
#include < system/SystemClock.h>
71
73
72
74
#include < atomic>
75
+ #include < dns_sd.h>
73
76
74
77
#import < os/lock.h>
75
78
@@ -1342,6 +1345,15 @@ - (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID att
1342
1345
return nil ;
1343
1346
}
1344
1347
1348
+ #ifdef DEBUG
1349
+ + (void )forceLocalhostAdvertisingOnly
1350
+ {
1351
+ auto interfaceIndex = chip::Inet::InterfaceId::PlatformType (kDNSServiceInterfaceIndexLocalOnly );
1352
+ auto interfaceId = chip::Inet::InterfaceId (interfaceIndex);
1353
+ chip::app::DnssdServer::Instance ().SetInterfaceId (interfaceId);
1354
+ }
1355
+ #endif // DEBUG
1356
+
1345
1357
@end
1346
1358
1347
1359
/* *
Original file line number Diff line number Diff line change 32
32
static NSString * kOnboardingPayload = @" MT:-24J0AFN00KA0648G00" ;
33
33
static const uint16_t kTestVendorId = 0xFFF1u ;
34
34
35
+ #ifdef DEBUG
36
+ @interface MTRDeviceController (Test)
37
+ + (void )forceLocalhostAdvertisingOnly ;
38
+ @end
39
+ #endif // DEBUG
40
+
35
41
@interface MTRPerControllerStorageTestsControllerDelegate : NSObject <MTRDeviceControllerDelegate>
36
42
@property (nonatomic , strong ) XCTestExpectation * expectation;
37
43
@property (nonatomic , strong ) NSNumber * deviceID;
@@ -1043,6 +1049,12 @@ - (void)test007_TestMultipleControllers
1043
1049
// startControllerWithRootKeys into a test helper.
1044
1050
- (void )testControllerServer
1045
1051
{
1052
+ #ifdef DEBUG
1053
+ // Force our controllers to only advertise on localhost, to avoid DNS-SD
1054
+ // crosstalk.
1055
+ [MTRDeviceController forceLocalhostAdvertisingOnly ];
1056
+ #endif // DEBUG
1057
+
1046
1058
__auto_type queue = dispatch_get_main_queue ();
1047
1059
1048
1060
__auto_type * rootKeys = [[MTRTestKeys alloc ] init ];
You can’t perform that action at this time.
0 commit comments