From 5a778ebc378d7a1bc9716177950c9e8ac000bb56 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 12 Jun 2024 19:07:14 +1000 Subject: [PATCH] tests/thread: Re-enable GC before stress_schedule test ends. Otherwise GC stays disabled (not re-enabled by soft reset) and later test runs fail with MemoryError. Signed-off-by: Angus Gratton --- tests/thread/stress_schedule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/thread/stress_schedule.py b/tests/thread/stress_schedule.py index a5d7dc824e..97876f0f77 100644 --- a/tests/thread/stress_schedule.py +++ b/tests/thread/stress_schedule.py @@ -52,6 +52,8 @@ while n < _NUM_TASKS and time.ticks_diff(time.ticks_ms(), t) < _TIMEOUT_MS: thread_run = False time.sleep_ms(20) +gc.enable() + if n < _NUM_TASKS: # Not all the tasks were scheduled, likely the scheduler stopped working. print(n)