Retrigger salt-model tests only for timeout

Change-Id: I520a1de1d1ac07f0c494a81e4a5f47de9c512b3b
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 8e44bfc..937d71c 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -61,7 +61,16 @@
         if (checkouted) {
           def workspace = common.getWorkspace()
           common.infoMsg("Running salt model test for node ${NODE_TARGET} in cluster ${CLUSTER_NAME}")
-          saltModelTesting.setupAndTestNode(NODE_TARGET, CLUSTER_NAME, EXTRA_FORMULAS, workspace, FORMULAS_SOURCE, FORMULAS_REVISION, MAX_CPU_PER_JOB.toInteger(), RECLASS_IGNORE_CLASS_NOTFOUND, LEGACY_TEST_MODE, APT_REPOSITORY, APT_REPOSITORY_GPG)
+          try {
+            setupAndTestNode(NODE_TARGET, CLUSTER_NAME, EXTRA_FORMULAS, workspace, FORMULAS_SOURCE, FORMULAS_REVISION, MAX_CPU_PER_JOB.toInteger(), RECLASS_IGNORE_CLASS_NOTFOUND, LEGACY_TEST_MODE, APT_REPOSITORY, APT_REPOSITORY_GPG)
+          } catch (Exception e) {
+            if (e.getMessage() == "script returned exit code 124") {
+              common.errorMsg("Impossible to test node due to timeout of salt-master, ABORTING BUILD")
+              currentBuild.result = "ABORTED"
+            } else {
+              throw e
+            }
+          }
         }
       }
     } catch (Throwable e) {