Commit 876fcf5
[Test Update] Updating TC_CADMIN_1_3_4 and cadmin_support python3 modules for clock skew allowance subscription (project-chip#39756)
* Updating TC_CADMIN_1_3_4 and cadmin_support python3 modules:
- Updated these to include new real-time commissioning window monitoring with subscriptions to remove prior hardcoded sleep
- Added timing validation with clock skew tolerance
- Provides detailed timing metrics to show exactly how long the commissioning window was open and how much clock skew applied
- Removed test steps 10 and 11 as no longer using in TC_CADMIN_1_3_4 python3 test module, as we get the window closed status back in our subscription at the end of test step 9.
* isort and autopep8 stylizered
* Resolving broad exception, changed to asyncio.TimeoutError instead
* Resolving linting errors
* Updating cadmin_support python3 support module:
- Created a new variable named monitoring_timeout which is max_allowed_duration + 10 seconds.
- Updated the commissioning option var name to commissioning_option for clarity and now use a local CommissioningWindowOption enum as well as updated docstring
- Updated expected_status from an int to a True or False bool value, changed expected_status to is_open_expected var name
* Restyled by autopep8
* Restyled by isort
* Updating cadmin_support python3 support module:
- Changing "if is_open_expected=False" to "if not is_open_expected" in order to resolve linting error.
* Update cadmin_support.py
Changing import location of ClusterAttributeChangeAccumulator from chip.testing.matter_testing to chip.testing.event_attribute_reporting
* remove get_txt_record function from cadmin_support support module as it is unused
* Restyled by autopep8
* Restyled by isort
* Updating cadmin_support support and TC_CADMIN_1_3_4 test modules:
- Due to merge of AttributeChangeCallback and ClusterAttributeChangeAccumulator classes into AttributeSubscriptionHandler class in PR project-chip#39672 had to make some changes to get this working after that PR merged
- Resolved some minor overlap with other CADMIN tests and some of the support functions for opening commissioning window in cadmin_support support module
- Verified all CADMIN test modules are now passing
* Restyled by isort
* Updating TC_CADMIN_1_3_4 test module and cadmin_support modules:
- Fixed the race condition in step 9 by using open_commissioning_window_with_subscription_monitoring to establish the subscription before opening the commissioning window, then using the monitor_commissioning_window_closure_with_subscription function to monitor the subscription until the commissioning window closes.
- Fixed the AttributeError by replacing ._jsonData["sdk-config"]["f/1/r"] with the proper API call GetSdkKey("f/1/r")
- Function wait_for_window_status_change now asserts on timeout, otherwise silently passes without a return as not needed since we know it passes if it doesnt experience a timeout
- Removed the dead code from the log_timing_results function after changes made to wait_for_window_status_change function
- Removed open_commissioning_window_with_full_args function as it is best to keep the code simple adding without unneccessary functionality.
* Restyled by isort
* Resolving linting issues and restyled by isort
* Restyled by autopep8
* Restyled by autopep8
* Updating cadmin_support and TC_CADMIN_1_3_4 python3 test modules:
- Removed unused get_all_txt_records function
- Updated to using TimingResults dataclass instead of dictionary
* Resolving linting error
* Removed duplicated error logging for timing results in cadmin_support module
---------
Co-authored-by: Restyled.io <commits@restyled.io>1 parent 22a2794 commit 876fcf5
2 files changed
Lines changed: 319 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
196 | 190 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
202 | 199 | | |
203 | | - | |
| 200 | + | |
204 | 201 | | |
205 | 202 | | |
206 | | - | |
207 | | - | |
| 203 | + | |
208 | 204 | | |
209 | | - | |
210 | | - | |
| 205 | + | |
| 206 | + | |
211 | 207 | | |
212 | 208 | | |
213 | 209 | | |
214 | | - | |
| 210 | + | |
215 | 211 | | |
216 | | - | |
| 212 | + | |
217 | 213 | | |
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
221 | 217 | | |
222 | 218 | | |
223 | 219 | | |
224 | | - | |
| 220 | + | |
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
229 | 225 | | |
230 | 226 | | |
231 | | - | |
| 227 | + | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
| |||
263 | 261 | | |
264 | 262 | | |
265 | 263 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
271 | 267 | | |
272 | | - | |
| 268 | + | |
273 | 269 | | |
274 | | - | |
| 270 | + | |
275 | 271 | | |
276 | | - | |
| 272 | + | |
277 | 273 | | |
278 | 274 | | |
279 | 275 | | |
| |||
303 | 299 | | |
304 | 300 | | |
305 | 301 | | |
306 | | - | |
| 302 | + | |
| 303 | + | |
307 | 304 | | |
308 | 305 | | |
309 | 306 | | |
| |||
0 commit comments