diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-06-12 19:07:14 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-06-21 14:45:59 +1000 |
commit | 5a778ebc378d7a1bc9716177950c9e8ac000bb56 (patch) | |
tree | 237a700109b767e2242db6012222661c5cbea7c7 /tests/thread | |
parent | 407464348d64759e7b4d9a129ff367074c5797bd (diff) | |
download | micropython-5a778ebc378d7a1bc9716177950c9e8ac000bb56.tar.gz micropython-5a778ebc378d7a1bc9716177950c9e8ac000bb56.zip |
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 <angus@redyak.com.au>
Diffstat (limited to 'tests/thread')
-rw-r--r-- | tests/thread/stress_schedule.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |