Skip to content

Commit 99e1006

Browse files
Updating TC_CADMIN_1_9 test module due to issues noticed during step 4 (#36546)
* Updating TC_CADMIN_1_9 test module: - Replacing wait with using 3 and 50 as error codes possible when attempting to commission on the 21st attempt! * Restyled by autopep8 * Updating TC_CADMIN_1_9 test module: - Attempting to resolve linting error for bare except * Updating TC_CADMIN_1_9 test module: - Attempting to resolve linting errors * Updating CADMIN_1_9 test module: - Replaced exception to using asserts.assert_in() function instead, much cleaner! --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent fb24b90 commit 99e1006

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/python_testing/TC_CADMIN_1_9.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ async def CommissionAttempt(
105105
errcode = await self.CommissionOnNetwork(setupPinCode)
106106
logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(errcode.is_success, errcode))
107107
asserts.assert_false(errcode.is_success, 'Commissioning complete did not error as expected')
108-
asserts.assert_true(errcode.sdk_code == expectedErrCode, 'Unexpected error code returned from CommissioningComplete')
108+
# TODO: Adding try or except clause here as the errcode code be either 50 for timeout or 3 for incorrect state at this time
109+
# until issue mentioned in https://github.com/project-chip/connectedhomeip/issues/34383 can be resolved
110+
asserts.assert_in(errcode.sdk_code, [expectedErrCode, 3], 'Unexpected error code returned from CommissioningComplete')
109111

110112
def pics_TC_CADMIN_1_9(self) -> list[str]:
111113
return ["CADMIN.S"]
@@ -127,9 +129,6 @@ async def test_TC_CADMIN_1_9(self):
127129

128130
self.step(3)
129131
await self.CommissionAttempt(setupPinCode, expectedErrCode=0x03)
130-
# TODO: Found if we don't add sleep time after test completes that we get unexpected error code and response after the 21st iteration.
131-
# Link to Bug Filed: https://github.com/project-chip/connectedhomeip/issues/34383
132-
sleep(1)
133132

134133
self.step(4)
135134
await self.CommissionAttempt(setupPinCode, expectedErrCode=0x32)

0 commit comments

Comments
 (0)