Skip to content

Conversation

dpgeorge
Copy link
Member

With sleep(0.2) a multiple of sleep(0.1), the order of task 2 and 3 execution is not well defined, and depends on the precision of the system clock and how fast the rest of the code runs. So change 0.2 to 0.18 to make the test more reliable.

Also fix a typo of t3/t4, and cancel t4 at the end.

@dpgeorge dpgeorge added the tests Relates to tests/ directory in source label Aug 26, 2020
With sleep(0.2) a multiple of sleep(0.1), the order of task 2 and 3
execution is not well defined, and depends on the precision of the system
clock and how fast the rest of the code runs.  So change 0.2 to 0.18 to
make the test more reliable.

Also fix a typo of t3/t4, and cancel t4 at the end.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the tests-reliable-asyncio-fair branch from f2dd076 to 5fb276d Compare August 26, 2020 07:06
@dpgeorge
Copy link
Member Author

The only failure here is a 1-line change in coverage which is unrelated (?) to the change.

@dpgeorge dpgeorge merged commit 5fb276d into micropython:master Aug 26, 2020
@dpgeorge dpgeorge deleted the tests-reliable-asyncio-fair branch August 26, 2020 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Relates to tests/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant