Support changes for 2019.2.0 release
Change-Id: Ia2e00ef74198818c8f73fa6fff08c47c947e1e52
diff --git a/tcp_tests/managers/jenkins/client.py b/tcp_tests/managers/jenkins/client.py
index afc8900..e713e71 100644
--- a/tcp_tests/managers/jenkins/client.py
+++ b/tcp_tests/managers/jenkins/client.py
@@ -7,6 +7,8 @@
from devops.helpers import helpers
+from requests.exceptions import ConnectionError
+
class JenkinsWrapper(jenkins.Jenkins):
"""Workaround for the bug:
@@ -122,7 +124,11 @@
print(prefix, end='')
def building():
- status = not self.build_info(name, build_id)['building']
+ try:
+ status = not self.build_info(name, build_id)['building']
+ except ConnectionError:
+ status = False
+
if verbose:
time_str = time.strftime("%H:%M:%S")
prefix = "\n" + job_output_prefix.format(
diff --git a/tcp_tests/managers/saltmanager.py b/tcp_tests/managers/saltmanager.py
index 1e1640f..c2bcc05 100644
--- a/tcp_tests/managers/saltmanager.py
+++ b/tcp_tests/managers/saltmanager.py
@@ -277,9 +277,10 @@
# because previous authentication most probably is not valid
# before or after time sync.
self.__api = None
- self.run_state(
- tgt,
- 'cmd.run', 'service ntp stop; if [ -x /usr/sbin/ntpdate ]; then ntpdate -s ntp.ubuntu.com; else ntpd -gq ; fi; service ntp start') # noqa
+ if not settings.SKIP_SYNC_TIME:
+ self.run_state(
+ tgt,
+ 'cmd.run', 'service ntp stop; if [ -x /usr/sbin/ntpdate ]; then ntpdate -s ntp.ubuntu.com; else ntpd -gq ; fi; service ntp start') # noqa
new_time_res = self.run_state(tgt, 'cmd.run', 'date')
for node_name, time in sorted(new_time_res[0]['return'][0].items()):
LOG.info("{0}: {1}".format(node_name, time))