Skip to content

Commit 1534228

Browse files
bzbarsky-applekiel-apple
authored andcommitted
Depend less on precise all-clusters-app endpoints layout in Darwin tests. (#34378)
* Depend less on precise all-clusters-app endpoints layout in Darwin tests. * test020_ReadMultipleAttributes and test021_ReadMultipleWildcardPathsIncludeUnsupportedAttribute were assuming three endpoints numbered 0, 1, 2. The fix is to just read the PartsList from the device instead of making assumptions. * test033_TestMTRDeviceDeviceConfigurationChanged was assuming various things about which clusters are on which endpoints, as well as assuming that the PartsList of EP0 is _not_ [1, 2, 3]. Fix things so that we track which endpoint things are actually on, and make sure we take the PartsList from the device and add an entry that's not in it already to it instead of assuming its value. * testDataStorageUpdatesWhenRemovingEndpoints was comparing arrays of endpoints, but some of those arrays come from enumerating dictionary keys. Changing the set of keys can change their order. The fix is to compare sets of endpoints instead. Also, add asserts that the endpoint we are removing (2) is actually in the list, so that if that ever stops being true the test failure will be more understandable. * Apply suggestions from code review Co-authored-by: Kiel Oleson <[email protected]> --------- Co-authored-by: Kiel Oleson <[email protected]>
1 parent 7cb3b55 commit 1534228

File tree

2 files changed

+112
-61
lines changed

2 files changed

+112
-61
lines changed

0 commit comments

Comments
 (0)