Add debug messages to the delegate callbacks for test033_TestMTRDeviceDeviceConfigurationChanged (#35906)
diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
index cb2acf2..8a3188c 100644
--- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
+++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m
@@ -3283,6 +3283,7 @@
// Check if the received attribute report matches the injected attribute report.
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
+ NSLog(@"checkAttributeReportTriggersConfigurationChanged: onAttributeDataReceived called");
attributeReportsReceived += attributeReport.count;
XCTAssert(attributeReportsReceived > 0, @"%@", description);
for (NSDictionary<NSString *, id> * attributeDict in attributeReport) {
@@ -3309,12 +3310,14 @@
};
delegate.onReportEnd = ^() {
+ NSLog(@"checkAttributeReportTriggersConfigurationChanged: onReportEnd called");
[gotAttributeReportEndExpectation fulfill];
};
__block BOOL wasOnDeviceConfigurationChangedCallbackCalled = NO;
delegate.onDeviceConfigurationChanged = ^() {
+ NSLog(@"checkAttributeReportTriggersConfigurationChanged: onDeviceConfigurationChanged called");
[deviceConfigurationChangedExpectation fulfill];
wasOnDeviceConfigurationChangedCallbackCalled = YES;
};
@@ -3365,6 +3368,7 @@
__block NSNumber * endpointForPowerSourceConfigurationSources;
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
+ NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onAttributeDataReceived called");
attributeReportsReceived += attributeReport.count;
XCTAssert(attributeReportsReceived > 0);
@@ -3423,6 +3427,7 @@
};
delegate.onReportEnd = ^() {
+ NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onReportEnd called");
XCTAssertNotNil(dataVersionForDescriptor);
XCTAssertNotNil(dataVersionForOvenCavityOperationalState);
XCTAssertNotNil(dataVersionForIdentify);
@@ -3660,16 +3665,19 @@
XCTestExpectation * gotAttributeReportWithMultipleAttributesEndExpectation = [self expectationWithDescription:@"Attribute report with multiple attributes has ended"];
XCTestExpectation * deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes = [self expectationWithDescription:@"Device configuration changed was receieved due to an attribute report with multiple attributes "];
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
+ NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onAttributeDataReceived called with multiple attributes");
attributeReportsReceived += attributeReport.count;
XCTAssert(attributeReportsReceived > 0);
[gotAttributeReportWithMultipleAttributesExpectation fulfill];
};
delegate.onReportEnd = ^() {
+ NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onReportEnd called with multiple attributes");
[gotAttributeReportWithMultipleAttributesEndExpectation fulfill];
};
delegate.onDeviceConfigurationChanged = ^() {
+ NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onDeviceConfigurationChanged called for testing with multiple attributes");
[deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes fulfill];
};