why: because sometimes something that should be quick on most computers is slow in the gate (because cloud vms sometimes pause for reasons completely undetectable from inside the virtualization sandbox).
The "solutions" come in one of two forms:
1) increase the tolerable variance in the assert (which typically decrease the ability of the test to find regressions from an inadvertently behavior change)
2) change the nature of the test to validate logic instead of behaviors by mocking the timing calls with real values to remove actual time from being an input (which typically decreases the ability of the test to be robust against implementation changes that do not change behavior)
why: because sometimes something that should be quick on most computers is slow in the gate (because cloud vms sometimes pause for reasons completely undetectable from inside the virtualization sandbox).
The "solutions" come in one of two forms:
1) increase the tolerable variance in the assert (which typically decrease the ability of the test to find regressions from an inadvertently behavior change)
2) change the nature of the test to validate logic instead of behaviors by mocking the timing calls with real values to remove actual time from being an input (which typically decreases the ability of the test to be robust against implementation changes that do not change behavior)
e.g. maybe this change -> https:/ /review. openstack. org/#/c/ 83277/