Skip to content

Commit

Permalink
Make racy Darwin test less racy. (project-chip#27826)
Browse files Browse the repository at this point in the history
We used a 1s min-interval and a 1s sleep to wait for reports.  Those could race
very easily.  Better to use a sleep longer than the min-interval.

Fixes project-chip#27507
  • Loading branch information
bzbarsky-apple authored Jul 8, 2023
1 parent 4e60859 commit 488aabf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ - (void)test900_SubscribeClusterStateCache

MTRClusterStateCacheContainer * clusterStateCacheContainer = [[MTRClusterStateCacheContainer alloc] init];
NSLog(@"Setting up attribute cache subscription...");
__auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(60)];
__auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(0) maxInterval:@(60)];
[device subscribeWithQueue:queue
params:params
clusterStateCacheContainer:clusterStateCacheContainer
Expand Down

0 comments on commit 488aabf

Please sign in to comment.