Skip to content

Fix broken test performing concurrent writes to shared repo

Sami Hiltunen requested to merge smh-fix-broken-test into master

TestUserRebaseToRef_failure is sharing a test repository between the subtests. The subtests are ran concurrently. Each of the subtests are resetting the valid target ref on beginning. As the tests are ran concurrently, they're all modifying the repository concurrently. This won't work anymore with transactions enabled and will cause flakes.

As none of the tests should modify the repository, stop resetting the target ref at the beginning of each test. If one of the tests fails and modifies the ref, the other subtests could fail as well. This can be improved later by actually setting up independent test state for each of the tests. For now, fix the flake.

Merge request reports