CBielstein / APRSsharp

APRS# - Modern APRS software for the amateur radio community
MIT License
12 stars 5 forks source link

Update test timeout from custom `WaitForCondition` to xunit timeout #125

Closed CBielstein closed 2 years ago

CBielstein commented 2 years ago

Description

Currently, our tests use WaitForCondition with a timeout (or simply no timeout) to test scenarios. No timeout is acceptable for GitHub Actions as a global timeout can be set, though it doesn't help the developer see offending tests easily. Custom timeouts with waiting and timers is not reliable with parallelism enabled (by default in xunit) and we've had several times where we had to increase the timeout for GitHub Actions when it works locally, which is not ideal.

To fix this, we should switch to using xunit built-in timeout. To do so, there are two required steps:

Before submitting code, ensure this doesn't have too large of an impact on test runtime. While it'd be good to switch to standard timeout system, it may not be worth it if the tests suddenly take several minutes in stead of several seconds. Feel free to discuss here if the tradeoff isn't worth it or if it's unclear.

Acceptance Criteria