Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix termination tests randomly timing out
Unit tests are run in random order. Termination tests also verify the polling logic of the respective code, by atomically incrementing a counter in each call of the HTTP handler. The issues fixed with these changes are: 1. counter var not being reset after each termination test using polling 2. using the polling iterations loop in termination tests that were not using the HTTP handler that increments the counter 3. polling iterations loop not using sleep between iterations, which spikes CPU usage The first two issues led to the termination tests sometimes passing, depending on which termination test run first. If it was a test that incremented the polling counter, then all other test would be successful as well. If it was a test that didn't increment the polling counter, then the termination tests would be stuck in an endless loop, until the unit tests reached a timeout. Signed-off-by: Michail Resvanis <mresvani@redhat.com>
- Loading branch information