Merge "Remove Li redesign -all- test"
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-controller-run-test.sh
index cc617f7a80453ef303639ef56c65423729a9fc14..ff0d118fbed29c1b1a63baf39d23935284079dbd 100644 (file)
@@ -1,3 +1,4 @@
+#@IgnoreInspection BashAddShebang
 # Activate robotframework virtualenv
 # ${ROBOT_VENV} comes from the include-raw-integration-install-robotframework.sh
 # script.
@@ -87,13 +88,18 @@ sshpass -p karaf /tmp/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'
 echo "Listing all open ports on controller system"
 netstat -natu
 
-# checking for any bind exceptions in log which could indicate a port conflict
-if grep --quiet 'BindException: Address already in use' /tmp/${BUNDLEFOLDER}/data/log/karaf.log; then
-    echo BindException found: Possible port conflict
-    echo "Dumping Karaf log..."
-    cat /tmp/${BUNDLEFOLDER}/data/log/karaf.log
-    exit 1
-fi
+function exit_on_log_file_message {
+    echo "looking for \"\$1\" in log file"
+    if grep --quiet "\$1" /tmp/${BUNDLEFOLDER}/data/log/karaf.log; then
+        echo ABORTING: found "\$1"
+        echo "Dumping Karaf log..."
+        cat /tmp/${BUNDLEFOLDER}/data/log/karaf.log
+        exit 1
+    fi
+}
+
+exit_on_log_file_message 'BindException: Address already in use'
+exit_on_log_file_message 'server is unhealthy'
 
 EOF