diff options
author | John L. Villalovos <john@sodarock.com> | 2021-09-08 08:23:25 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-09-08 09:13:56 -0700 |
commit | 487b9a875a18bb3b4e0d49237bb7129d2c6dba2f (patch) | |
tree | cf17de5ed2eb222375589ff7c76b1087fd05c7b8 | |
parent | d8de4dc373dc608be6cf6ba14a2acc7efd3fa7a7 (diff) | |
download | gitlab-487b9a875a18bb3b4e0d49237bb7129d2c6dba2f.tar.gz |
chore: attempt to fix flaky functional test
Add an additional check to attempt to solve the flakiness of the
test_merge_request_should_remove_source_branch() test.
-rw-r--r-- | tests/functional/api/test_merge_requests.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/functional/api/test_merge_requests.py b/tests/functional/api/test_merge_requests.py index 179ae6f..b20b66a 100644 --- a/tests/functional/api/test_merge_requests.py +++ b/tests/functional/api/test_merge_requests.py @@ -125,10 +125,18 @@ def test_merge_request_should_remove_source_branch( time.sleep(0.5) assert mr.merged_at is not None time.sleep(0.5) + result = wait_for_sidekiq(timeout=60) + assert result is True, "sidekiq process should have terminated but did not" # Ensure we can NOT get the MR branch with pytest.raises(gitlab.exceptions.GitlabGetError): - project.branches.get(source_branch) + result = project.branches.get(source_branch) + # Help to debug in case the expected exception doesn't happen. + import pprint + + print("mr:", pprint.pformat(mr)) + print("mr.merged_at:", pprint.pformat(mr.merged_at)) + print("result:", pprint.pformat(result)) def test_merge_request_large_commit_message( |