-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The TestSecondWatcherAcquiresReleasedLease test was racy concerning which of the two pools would acquire the lease first. As a result, the test would either fail due to an unexpected event order, or hang until aborted because the pools wouldn't emit enough events for the event collection loop to terminate. This behavior was apparently only observable on Windows. Fix this by adding appropriate values for AcquireTime, RenewTime and LeaseDurationSeconds to the pre-created lease, so that it properly reflects its acquisition by the first pool. Also remove the namespace and pool creations from the other tests, as they were unnecessary. Inline the last required lease creation into the racy test case. Remove the WithRenewDeadline options from the pools under test, as they didn't have any impact on the test, neither semantically nor in terms of execution times. Reduce the RetryPeriod to 10 milliseconds to provide even more immediate test feedback. Rename some local variables and rephrase some log strings to make them more consistent. Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com> (cherry picked from commit 544307d) (cherry picked from commit b97c0ef)
- Loading branch information
1 parent
b92b1d6
commit bb8d32e
Showing
1 changed file
with
56 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters