Merge "Move dlux Sonar scan to Sonarcloud"
[releng/builder.git] / jjb / packaging / start-odl.sh
index 1e09b8f18e61f1082b49867c207924b2ad705361..cb30d9ebaff85565d24ffcf23be501bbea781f31 100644 (file)
@@ -12,5 +12,12 @@ sudo systemctl start opendaylight
 # Check systemd status of OpenDaylight, will fail if rc is nonzero
 sudo systemctl status opendaylight
 
+# Wait up to 60 seconds for ODL's Java process to start
+for i in $(seq 20); do
+  # shellcheck disable=SC2015
+  pgrep java && break || sleep 3
+  echo "Waited $((i * 3)) seconds for ODL Java process to start"
+done
+
 # Verify Java process is running, will fail if rc is nonzero
 pgrep java