summaryrefslogtreecommitdiff
path: root/tests/extmod/uasyncio_heaplock.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-03 22:39:58 +1000
committerDamien George <damien@micropython.org>2022-05-03 22:53:12 +1000
commitc90f097519c7342a128848bf9dc5b38ba75d4222 (patch)
treedf9c67263d9fa2cd3c7d97f893147825a2a22e1c /tests/extmod/uasyncio_heaplock.py
parent0e7bfc88c6ac6b5d64240f91183a3cfe2ab67ade (diff)
tests/extmod: Increase timing on uasyncio tests to make more reliable.
Non-real-time systems like Windows, Linux and macOS do not have reliable timing, so increase the sleep intervals to make these tests more likely to pass. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/uasyncio_heaplock.py')
-rw-r--r--tests/extmod/uasyncio_heaplock.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/extmod/uasyncio_heaplock.py b/tests/extmod/uasyncio_heaplock.py
index 3a92d36c9..34a51cd37 100644
--- a/tests/extmod/uasyncio_heaplock.py
+++ b/tests/extmod/uasyncio_heaplock.py
@@ -29,15 +29,15 @@ async def task(id, n, t):
async def main():
- t1 = asyncio.create_task(task(1, 4, 20))
- t2 = asyncio.create_task(task(2, 2, 50))
+ t1 = asyncio.create_task(task(1, 4, 100))
+ t2 = asyncio.create_task(task(2, 2, 250))
micropython.heap_lock()
print("start")
- await asyncio.sleep_ms(1)
+ await asyncio.sleep_ms(5)
print("sleep")
- await asyncio.sleep_ms(70)
+ await asyncio.sleep_ms(350)
print("finish")
micropython.heap_unlock()