diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py index 32b99b62b74..c01ea1c00dc 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py @@ -182,7 +182,7 @@ def test_config(test_topic, capsys): assert '/devices/{}/config'.format(device_id) in out -@flaky +@flaky(max_runs=5) def test_receive_command(capsys): device_id = device_id_template.format('RSA256') manager.create_registry( @@ -234,7 +234,7 @@ def test_receive_command(capsys): assert '\'me want cookies\'' in out # Verify can receive command -@flaky +@flaky(max_runs=5) def test_gateway_listen_for_bound_device_configs(test_topic, capsys): gateway_id = device_id_template.format('RS256') device_id = device_id_template.format('noauthbind') @@ -280,7 +280,7 @@ def test_gateway_listen_for_bound_device_configs(test_topic, capsys): assert 'Received message' in out -@flaky +@flaky(max_runs=5) def test_gateway_send_data_for_device(test_topic, capsys): gateway_id = device_id_template.format('RS256') device_id = device_id_template.format('noauthbind') diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py b/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py index 4f158f5b8c7..6d64f9b266a 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py @@ -88,7 +88,7 @@ def test_image(test_topic, capsys): assert 'on_publish' in out -@flaky +@flaky(max_runs=5) def test_image_recv(test_topic, capsys): """Transmit an image with IoT Core and receive it from PubSub""" subscriber = pubsub.SubscriberClient()