project-chip / certification-tool

A test harness and tooling designed to simplify development, testing, and certification for devices, guided by the Connectivity Standards Alliance.
https://csa-iot.org/
Apache License 2.0
42 stars 24 forks source link

[Bug]TimeoutError in test_TC_TIMESYNC_2_1 due to CancelledError in Read operation. #377

Closed Rajashreekalmane closed 2 months ago

Rajashreekalmane commented 3 months ago

Describe the bug

The test_TC_TIMESYNC_2_1 test case fails with a TimeoutError due to a CancelledError occurring during the Read operation. This seems to be caused by the operation taking longer than the allowed timeout, leading to the cancellation of the task.

[MatterTest] 08-16 06:58:32.248 ERROR Exception occurred in test_TC_TIMESYNC_2_1. Traceback (most recent call last): File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut ^^^^^^^^^ File "/root/python_testing/scripts/sdk/matter_testing_support.py", line 1794, in get_accepted_endpoints_for_test wildcard = await self.default_controller.Read(self.dut_node_id, [()]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/chip/ChipDeviceCtrl.py", line 1534, in Read return await future ^^^^^^^^^^^^ asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 818, in exec_one_test test_method() File "/root/python_testing/scripts/sdk/matter_testing_support.py", line 1833, in per_endpoint_runner endpoints = asyncio.run(runner_with_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/tasks.py", line 519, in wait_for async with timeouts.timeout(timeout): File "/usr/lib/python3.12/asyncio/timeouts.py", line 115, in aexit raise TimeoutError from exc_val TimeoutError [MatterTest] 08-16 06:58:32.249 INFO { [MatterTest] 08-16 06:58:32.260 INFO

Python Script References: https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/TC_TIMESYNC_2_1.py

Steps to reproduce the behavior

  1. Open the UI
  2. Upload the PICS
  3. Ensure the TC_TIMESYNC_2_1 test case is selected
  4. Executed the below mentioned command to put DUT into a commissionable state, ./chip-all-clusters-app
  5. Click the Start button on Test-Harness user interface.

Expected behavior

The test_TC_TIMESYNC_2_1 test case should successfully execute without encountering any TimeoutError or CancelledError

Log files

TC_TIMESYNC_2_1.log tc_timesync_2_1_DUT.txt

PICS file

Time Synchronization Cluster Test Plan.zip

Screenshots

image

Environment

TH Version: v2.11-beta2+fall2024 Sha: bbeda31

Additional Information

No response

rquidute commented 3 months ago

Hi @Rajashreekalmane I was able to reproduce the issue with the provided information in the bug. Also, I performed the same test with a new SDK SHA and it worked. While we still don't have a new TH version, let's keep the issue open, and whenever the new TH version is out, please do a re-test.

Rajashreekalmane commented 2 months ago

issue resolved in latest TH Version: v2.11-beta3+fall2024 Sha: f52d40a