From 13f9e8aa63f3a59107d536b78a5560f8dbc566f9 Mon Sep 17 00:00:00 2001 From: "jrwren@xmtp.net" <> Date: Fri, 20 Nov 2015 10:52:23 -0500 Subject: use sentry.wait() instead of time.sleep - much faster. --- tests/04_deploy_with_storage.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/04_deploy_with_storage.py b/tests/04_deploy_with_storage.py index 8013641..a429ca1 100755 --- a/tests/04_deploy_with_storage.py +++ b/tests/04_deploy_with_storage.py @@ -57,9 +57,8 @@ def validate_status(): ############################################################# def validate_replicaset_setup(): - print("sleeping ot wait for replicatset") - time.sleep(wait_for_replicaset) - print("waking") + d.sentry.wait() +#time.sleep(wait_for_replicaset) unit_status = [] @@ -86,7 +85,11 @@ def validate_replicaset_setup(): validate_status() validate_replicaset_setup() print("Adding storage relation, and sleeping for 2 min.") -d.relate('mongodb:data', 'storage:data') -time.sleep(wait_for_relation) +try: + d.relate('mongodb:data', 'storage:data') +except OSError as e: + print("ignoring error:{}", e) +d.sentry.wait() +#time.sleep(wait_for_relation) validate_status() validate_replicaset_setup() -- cgit v1.2.3