Add more verbosity for Common.retry function
Currently it is not clear why sometimes failed body of
retry block, so let's add message with exception message.
Change-Id: I7ba56063be197f42d846485b129941de069da597
Related-Prod: PROD-26381
(cherry picked from commit 900a3afa6e1d75df702a1a5474ed51e3876e4433)
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 4922505..901b842 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -534,11 +534,11 @@
def retry(int times = 5, int delay = 0, Closure body) {
int retries = 0
- def exceptions = []
while (retries++ < times) {
try {
return body.call()
} catch (e) {
+ errorMsg(e.toString())
sleep(delay)
}
}