Commit 6871a5e1 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

test_topic: reduced code duplication in async assertion

This code was probably written before the corresponding
`wait_assert` method. Now the latter is obviously better.
parent a120dccbdb8b
import pytest
import time
from urllib.parse import parse_qs
from .utils.hg import LocalRepo
......@@ -231,14 +230,7 @@ def test_topic_publish(test_project, tmpdir):
repo.hg('push', '--publish', url, expected_return_code=1)
# the GitLab branch for the topic has been pruned
pruned = False
start = time.time()
while not pruned and time.time() - start < 10:
branch_titles = test_project.api_branch_titles()
pruned = 'topic/default/zetop' not in branch_titles
if not pruned:
assert branch_titles == {'branch/default': 'Commit 1'}
test_project.wait_assert_api_branch_titles({'branch/default': 'Commit 1'})
def test_topic_new_mr_prompt_non_default_target(test_project, tmpdir):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment