8000 Iot flaky tests [(#3068)](https://github.com/GoogleCloudPlatform/pyth… · googleapis/python-iot@384509f · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit 384509f

Browse files
authored
* Checks if min_passes can be used now that we have swapped out devrel tools * Replace imports. * More random registry id
1 parent b64eaad commit 384509f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

samples/api-client/manager/manager_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
import os
1717
import sys
1818
import time
19+
import uuid
1920

2021
# Add command receiver for bootstrapping device registry / device for testing
2122
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'mqtt_example')) # noqa
22-
from gcp_devrel.testing.flaky import flaky
23+
from flaky import flaky
2324
from google.cloud import pubsub
2425
import pytest
2526

@@ -38,7 +39,7 @@
3839
service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
3940

4041
pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id)
41-
registry_id = 'test-registry-{}'.format(int(time.time()))
42+
registry_id = 'test-registry-{}-{}'.format(uuid.uuid1(), int(time.time()))
4243

4344

4445
@pytest.fixture(scope="session", autouse=True)
@@ -362,7 +363,7 @@ def test_add_patch_delete_es256(test_topic, capsys):
362363
service_account_json, project_id, cloud_region, registry_id)
363364

364365

365-
@flaky
366+
@flaky(max_runs=5, min_passes=1)
366367
def test_send_command(test_topic, capsys):
367368
device_id = device_id_template.format('RSA256')
368369
manager.create_registry(

samples/api-client/manager/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
cryptography==2.8
22
flaky==3.6.1
3-
gcp-devrel-py-tools==0.0.15
43
google-api-python-client==1.7.11
54
google-auth-httplib2==0.0.3
65
google-auth==1.11.2

0 commit comments

Comments
 (0)
0