Skip to content

Commit

Permalink
Fixed CHIPTests
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple committed Jul 6, 2022
1 parent 707d60b commit cb6f46a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIPTests/MTRClustersTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ - (void)testReuseChipClusterObject
XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseMTRClusterObjectFirstCall"];

dispatch_queue_t queue = dispatch_get_main_queue();
MTRTestCluster * cluster = [[MTRTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpoint:1 queue:queue];
XCTAssertNotNil(cluster);

[cluster testWithCompletionHandler:^(NSError * err) {
Expand Down
18 changes: 9 additions & 9 deletions src/darwin/Framework/CHIPTests/MTRDeviceTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -823,15 +823,15 @@ - (void)test011_ReadCachedAttribute
// Read cache
NSLog(@"Reading from cache...");
cacheExpectation = [self expectationWithDescription:@"Attribute cache read"];
[MTROnOff readAttributeOnOffWithAttributeCache:attributeCacheContainer
endpoint:@1
queue:queue
completionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) {
NSLog(@"Read attribute cache value: %@, error: %@", value, err);
XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0);
XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:NO]]);
[cacheExpectation fulfill];
}];
[MTRBaseClusterOnOff readAttributeOnOffWithAttributeCache:attributeCacheContainer
endpoint:@1
queue:queue
completionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) {
NSLog(@"Read attribute cache value: %@, error: %@", value, err);
XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0);
XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:NO]]);
[cacheExpectation fulfill];
}];
[self waitForExpectations:[NSArray arrayWithObject:cacheExpectation] timeout:kTimeoutInSeconds];

// Read from cache using generic path
Expand Down

0 comments on commit cb6f46a

Please sign in to comment.