Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21219] Fix flakyness on test with participants in the same container #5010

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions test/examples/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ def test_configuration(pub_args, sub_args):
for line in render_out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
continue

if sent != 0 and received != 0 and sent * 2 == received:
ret = True
Expand Down Expand Up @@ -158,8 +156,7 @@ def test_configuration_expected_output(pub_args, sub_args, expected_message, n_m
for line in render_out:
if expected_message in line:
count += 1
continue


if count >= int(n_messages):
ret = True
else:
Expand Down
4 changes: 1 addition & 3 deletions test/examples/test_content_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ def test_content_filter(pub_reader_filters, sub_custom_filter):
for line in out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
match = re.search(r'index:\s+(\d+)', line)
if match:
number = int(match.group(1))
data.append(number)
continue


ret = True
if sent != 0 and received != 0:
for elem in data:
Expand Down
4 changes: 1 addition & 3 deletions test/examples/test_custom_payload_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ def test_custom_payload_pool():
for line in out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
continue


if sent != 0 and received != 0 and sent == received:
ret = True
else:
Expand Down
6 changes: 2 additions & 4 deletions test/examples/test_delivery_mechanisms.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ def test_delivery_mechanisms(pub_args, sub_args, isub_args, pubsub_args, repetit
for line in out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
continue

if sent != 0 and received != 0 and repetitions == received:
ret = True
else:
Expand Down Expand Up @@ -142,8 +141,7 @@ def test_delivery_mechanisms_expected_output(pub_args, sub_args, pubsub_args, ex
for line in render_out:
if expected_message in line:
count += 1
continue


if count >= int(n_messages):
ret = True
else:
Expand Down
6 changes: 2 additions & 4 deletions test/examples/test_delivery_mechanisms_isolated.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ def test_delivery_mechanisms_isolated(pub_args, sub_args, isub_args, pubsub_args
for line in out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
continue

if sent != 0 and received != 0 and repetitions == received:
ret = True
else:
Expand Down Expand Up @@ -129,8 +128,7 @@ def test_delivery_mechanisms_isolated_expected_output(pub_args, sub_args, pubsub
for line in render_out:
if expected_message in line:
count += 1
continue


if count >= int(n_messages):
ret = True
else:
Expand Down
4 changes: 1 addition & 3 deletions test/examples/test_hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ def test_hello_world():
for line in out:
if 'SENT' in line:
sent += 1
continue

if 'RECEIVED' in line:
received += 1
continue


if sent != 0 and received != 0 and sent * 2 == received:
ret = True
else:
Expand Down
4 changes: 1 addition & 3 deletions test/examples/test_xtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ def test_xtypes():
for line in out:
if 'sent' in line or 'SENT' in line:
sent += 1
continue

if 'received' in line or 'RECEIVED' in line:
received += 1
continue


if sent != 0 and received != 0 and sent * 3 == received:
ret = True
else:
Expand Down
Loading