Skip to content

Fix flaky RemoveRepository test

John Cai requested to merge jc-fix-remove-repo-test into master

The TestRemoveRepository suffered from a race condition whereby the test function would exit because the polling function would detect the repo removal, which triggered the context for the replication manager to close, which caused the second replication job to fail and get retried. While this is happening, the other deferred functions run, including the one to restore the configs.

To avoid this race condition, use a queue interceptor to block on both replication jobs completing. Then check the paths to ensure they were removed.

fixes: #2698 (closed)

Merge request reports

Loading