Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random test failures during CI #24

Open
mvdwetering opened this issue Nov 9, 2024 · 0 comments
Open

Random test failures during CI #24

mvdwetering opened this issue Nov 9, 2024 · 0 comments

Comments

@mvdwetering
Copy link
Owner

In CI there are regularly random test failures like the one below.
It seems to be timing related and an attempt was made to "fix" it with a sleep, but stil randomly fails.

This should be fixed properly. Not sure how though. Kind of want to wait for the disconnect callback to be called with a timeout, but can't figure out how to do it.

It is also weird that it takes > 0.5 seconds for it to be called after calling close() on the serial mock. Maybe there is something going on there also.

2024-11-09T14:13:48.6356054Z         mock_serial.close()
2024-11-09T14:13:48.6356643Z         time.sleep(SHORT_DELAY)
2024-11-09T14:13:48.6357183Z     
2024-11-09T14:13:48.6357818Z >       assert disconnect_callback.call_count == 1
2024-11-09T14:13:48.6358576Z E       AssertionError: assert 0 == 1
2024-11-09T14:13:48.6359530Z E        +  where 0 = <MagicMock id='140220867950992'>.call_count

Attached full logs from a failed run because I don't know how long the logs will be kept. Failure was in the test_wtih_pytest step for Python 3.11.
logs_30695975446.zip

@mvdwetering mvdwetering changed the title Random test failures, during CI Random test failures during CI Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant