Skip to content

Commit 0d50ec7

Browse files
authored
Fix flaky test (GoogleCloudPlatform#2281)
1 parent f25c5d2 commit 0d50ec7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# Add manager as library
2424
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'manager')) # noqa
2525
import cloudiot_mqtt_image
26+
from gcp_devrel.testing.flaky import flaky
2627
import manager
2728

2829

@@ -87,6 +88,7 @@ def test_image(test_topic, capsys):
8788
assert 'on_publish' in out
8889

8990

91+
@flaky
9092
def test_image_recv(test_topic, capsys):
9193
"""Transmit an image with IoT Core and receive it from PubSub"""
9294
subscriber = pubsub.SubscriberClient()
@@ -117,7 +119,7 @@ def test_image_recv(test_topic, capsys):
117119
time.sleep(10)
118120

119121
cloudiot_mqtt_image.receive_image(
120-
project_id, subscription_name, 'test', 'png', 30)
122+
project_id, subscription_name, 'test', 'png', 60)
121123

122124
# Clean up
123125
subscriber.delete_subscription(subscription_path)

0 commit comments

Comments
 (0)