Skip to content

Commit

Permalink
Unit test fix for TSAN
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple authored and woody-apple committed Sep 9, 2024
1 parent 0f6d069 commit df36535
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/darwin/Framework/CHIPTests/MTRPairingTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr
@end

@interface MTRPairingTestMonitoringControllerDelegate : NSObject <MTRDeviceControllerDelegate>
@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
Expand All @@ -147,25 +147,25 @@ - (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
commissioningComplete:(NSError * _Nullable)error
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

Expand Down

0 comments on commit df36535

Please sign in to comment.