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

Commit

Permalink
Browse files Browse the repository at this point in the history
* Checks if min_passes can be used now that we have swapped out devrel tools
* Replace imports.
* More random registry id
  • Loading branch information
gguuss authored Mar 10, 2020
1 parent b64eaad commit 384509f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions samples/api-client/manager/manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
import os
import sys
import time
import uuid

# Add command receiver for bootstrapping device registry / device for testing
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'mqtt_example')) # noqa
from gcp_devrel.testing.flaky import flaky
from flaky import flaky
from google.cloud import pubsub
import pytest

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

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


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


@flaky
@flaky(max_runs=5, min_passes=1)
def test_send_command(test_topic, capsys):
device_id = device_id_template.format('RSA256')
manager.create_registry(
Expand Down
1 change: 0 additions & 1 deletion samples/api-client/manager/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cryptography==2.8
flaky==3.6.1
gcp-devrel-py-tools==0.0.15
google-api-python-client==1.7.11
google-auth-httplib2==0.0.3
google-auth==1.11.2
Expand Down

0 comments on commit 384509f

Please sign in to comment.