8000 Darwin tests expect no endpoints to ever be added to all-clusters-app · Issue #34374 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Darwin tests expect no endpoints to ever be added to all-clusters-app #34374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tcarmelveilleux opened this issue Jul 17, 2024 · 1 comment · Fixed by #34378
Closed

Darwin tests expect no endpoints to ever be added to all-clusters-app #34374

tcarmelveilleux opened this issue Jul 17, 2024 · 1 comment · Fixed by #34378
Labels

Comments

@tcarmelveilleux
Copy link
Contributor

Darwin tests have many assumptions that there are endpoints 0, 1, 2. Adding a 3rd endpoint breaks a lot of tests.

Example:

2024-07-17T03:16:51.5527330Z /Users/runner/work/connectedhomeip/connectedhomeip/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m:2548: error: -[MTRPerControllerStorageTests testDataStorageUpdatesWhenRemovingEndpoints] : (([[controller.controllerDataStore _fetchEndpointIndexForNodeID:deviceID] isEqualToArray:testEndpoints]) is true) failed

which relates to:

    __block NSMutableDictionary<NSNumber *, NSArray<NSNumber *> *> * initialClusterIndex = [[NSMutableDictionary alloc] init];
    __block NSMutableArray<NSNumber *> * testEndpoints;

    delegate.
        XCTAssertNotNil(dataVersionForPartsList);
        XCTAssertNotNil(testClusterDataValueForPartsList);

        testEndpoints = [self getEndpointArrayFromPartsList:testDataForPartsList forDevice:device];

        // Make sure that the cluster data in the data storage is populated with cluster index and cluster data for endpoints 0, 1 and 2.
        // We do not need to check _persistedClusterData here. _persistedClusterData will be paged in from storage when needed so
        // just checking data storage should suffice here.
        dispatch_sync(self->_storageQueue, ^{

The test above (among others) expects exactly 3 endpoints enabled, and all of them to use NV storage.

This breaks the ability of anyone to change the composition of the all-clusters-app without cryptic failures related to low-level tests of the Darwin regression suite.

@tcarmelveilleux
Copy link
Contributor Author

FYI @nivi-apple @bzbarsky-apple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant
0