From ba1a330257674ca98ff4dc12e2408a7bb9a0bdd5 Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Sun, 8 Sep 2024 15:19:07 -0700 Subject: [PATCH] Unit test fix for TSAN --- src/darwin/Framework/CHIPTests/MTRPairingTests.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/darwin/Framework/CHIPTests/MTRPairingTests.m b/src/darwin/Framework/CHIPTests/MTRPairingTests.m index b2470c4bd7dde9..4e597961603ee9 100644 --- a/src/darwin/Framework/CHIPTests/MTRPairingTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPairingTests.m @@ -134,10 +134,10 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr @end @interface MTRPairingTestMonitoringControllerDelegate : NSObject -@property (nonatomic, readonly) BOOL statusUpdateCalled; -@property (nonatomic, readonly) BOOL commissioningSessionEstablishmentDoneCalled; -@property (nonatomic, readonly) BOOL commissioningCompleteCalled; -@property (nonatomic, readonly) BOOL readCommissioningInfoCalled; +@property (atomic, readwrite) BOOL statusUpdateCalled; +@property (atomic, readwrite) BOOL commissioningSessionEstablishmentDoneCalled; +@property (atomic, readwrite) BOOL commissioningCompleteCalled; +@property (atomic, readwrite) BOOL readCommissioningInfoCalled; @end @implementation MTRPairingTestMonitoringControllerDelegate @@ -147,12 +147,12 @@ - (NSString *)description } - (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status { - _statusUpdateCalled = YES; + self.statusUpdateCalled = YES; } - (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error { - _commissioningSessionEstablishmentDoneCalled = YES; + self.commissioningSessionEstablishmentDoneCalled = YES; } - (void)controller:(MTRDeviceController *)controller @@ -160,12 +160,12 @@ - (void)controller:(MTRDeviceController *)controller nodeID:(NSNumber * _Nullable)nodeID metrics:(MTRMetrics *)metrics { - _commissioningCompleteCalled = YES; + self.commissioningCompleteCalled = YES; } - (void)controller:(MTRDeviceController *)controller readCommissioningInfo:(MTRProductIdentity *)info { - _readCommissioningInfoCalled = YES; + self.readCommissioningInfoCalled = YES; } @end