project-chip / project-chip/matter-test-scripts
[SU] Extendable test timeouts
Open
@jtrejoespinoza-grid is already working on this.
Since Feb 24, 2026.
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Description
Extendable test timeouts
It is hard to predict what test timeout to set in Software Update tests -- it depends on the image size. Implement a feedback mechanism in tests that prompts a user whether the timeout should be extended and extends the timeout.
reschedule method
One of the possible implementations is reschedule method and asynchronous context managers.
Example:
import asyncio
async def my_task():
try:
# Start with a 5-second timeout
async with asyncio.timeout(5) as delay:
print("Starting long task...")
await asyncio.sleep(3)
# Something happened! We need more time.
# Extend it by another 5 seconds from right now
new_deadline = asyncio.get_running_loop().time() + 5
delay.reschedule(new_deadline)
print("Timeout extended!")
await asyncio.sleep(4)
except TimeoutError:
print("Task timed out anyway!")
asyncio.run(my_task())
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.