Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apiserver/storage/cacher: decrease the running time of tests in the c…
…acher package. It turns out that kube has a custom timeout for tests of 3 minutes. The tests in the cacher package are utilizing nearly the entire time and are being terminated, resulting in failing jobs. Before the change, the TestWatchSemantics took ~43s to run. With this simple change, it now takes ~18s. When we created the tests, we didn't measure the running time and assumed that waiting 1 second on a watch channel to make sure no more events are received was sufficient. This PR decreases the waiting time to 300 milliseconds. Modern computers can perform many tasks within that time. In addition to that, the tests are serial in nature, meaning that there is no other actor that could add items to the database, which could result in receiving new items. After the change the total running time decreased by 17%. Before the tests needed ~176s after they need ~146s. The changes also improved TestWatchSemanticInitialEventsExtended. Kubernetes-commit: d9ca300598e7195545ca38ab9e5e640a2379d553
- Loading branch information