pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

TST: wait for conditions during troublesome tests #185

Closed tangkong closed 1 year ago

tangkong commented 1 year ago

Description

Try to fix tests in #169. Changes like these could be spread in many places

Basically just assert things with a timeout to give conditions the ability to settle.

Motivation and Context

169 , and other tests

How Has This Been Tested?

Locally, and by hitting the GHA re-run button a bunch of times, likely

Where Has This Been Documented?

This PR.

tangkong commented 1 year ago

I can expand this treatment to other tests, but I also haven't managed to see a test suite failure throughout the course of this PR. If anyone has a better stress test methodology I'd love to try it

ZLLentz commented 1 year ago

One way to stress test this is to use pytest-repeat but that might reveal other test suite issues

pytest --count=1000 tests/bad_tests.py