diff --git a/src/python_testing/TC_CGEN_2_8.py b/src/python_testing/TC_CGEN_2_8.py index 5e154cd15ee719..99925eb6e2bc80 100644 --- a/src/python_testing/TC_CGEN_2_8.py +++ b/src/python_testing/TC_CGEN_2_8.py @@ -129,9 +129,6 @@ async def test_TC_CGEN_2_8(self): "First CommissioningComplete failed", ) - # Close the commissioner session with the device to clean up resources - commissioner.CloseSession(nodeid=self.dut_node_id) - # Step 5: Factory reset is handled by test operator self.step(5) if not self.check_pics('PICS_USER_PROMPT'): @@ -140,6 +137,9 @@ async def test_TC_CGEN_2_8(self): self.wait_for_user_input(prompt_msg="Manually trigger factory reset on the DUT, then continue") + # Close the commissioner session with the device to clean up resources + commissioner.CloseSession(nodeid=self.dut_node_id) + # Step 6: Put device in commissioning mode (requiring user input, so skip in CI) self.step(6) self.wait_for_user_input(prompt_msg="Manually set the DUT into commissioning mode, then continue")