Change to sane default timeout
Changes the default timeout from ~28 hours to 1 hour.
Fixed syntax errors in two log messages.
Adds unit tests for timeouts.
Adds nose config to create Junit style output.
Fixes bug 1014
Change-Id: I7d1c2d28b397adc3ac638aa2366925dc744eade3
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/n2vc/juju_observer.py b/n2vc/juju_observer.py
index 7ed3dee..29ae932 100644
--- a/n2vc/juju_observer.py
+++ b/n2vc/juju_observer.py
@@ -184,9 +184,9 @@
# default values for no timeout
if total_timeout is None:
- total_timeout = 100000
+ total_timeout = 3600
if progress_timeout is None:
- progress_timeout = 100000
+ progress_timeout = 3600
# max end time
now = time.time()
@@ -215,7 +215,7 @@
if await _wait_for_event_or_timeout(entity.event, next_timeout):
entity.event.clear()
else:
- message = "Progress timeout {} seconds, {}}: {}".format(
+ message = "Progress timeout {} seconds, {}: {}".format(
progress_timeout, entity.entity_type, entity.entity_id
)
self.n2vc.debug(message)