Skip to content

coordinator: Fix flaky test caused by cache invalidation

The coordinator test for gRPC error handling creates a bunch of Gitaly servers and then invokes a mutator on all three nodes in parallel via a transactional RPC call. Unfortunately, it is hard to synchronize these three calls: while we can assure that all three calls are invoked, we cannot really assure that all three have been finalized already. This leads to flakiness in our tests due to cache invalidation: our middleware will asynchronously invalidate caches of the secondaries even though we have already observed failure of the primary node. As a result, it can happen that secondaries modify their state directories as we're about to wrap up the test and remove storage directories, which will then fail.

Inject a mock disk cache which simply does nothing to fix this issue.

Fixes #3653 (closed)

Merge request reports