Skip to content

Fix TestGitalyServerReturnsError_packObjects flakes

Sami Hiltunen requested to merge smh-flaky-limiter into master

TestGitalyServerReturnsError_packObjects is flaky as it asserts ordering of indeterministically ordered stderr lines. When a limit error is reached, the git clone prints the following output:

 remote: error executing git hook
 remote: error resource exhausted, please try again later
 error: git upload-pack: git-pack-objects died with error.
 fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
 remote: aborting due to possible repository corruption on the remote side.
 fatal: early EOF
 fatal: fetch-pack: invalid index-pack output

The tests are asserting the first two lines being printed out in order. They may be interleaved with the error messages though as it is not deterministic whether the command failures are printed before the side-band errors.

Fix the flaky test by just asserting the expected error messages exist in stderr but not their ordering.

Closes #6154 (closed)

Edited by Sami Hiltunen

Merge request reports

Loading