Makes sure Jetty doesn't terminate on ssh disconnect

Fixes BaseComputeServiceAdapterLiveTest.testCreateAndRunAService for CentOS 7. disown in jetty.sh is not enough to detach the process from the current session so it's terminated when jclouds closes the connection.
This commit is contained in:
Svetoslav Neykov 2017-07-20 10:14:50 +03:00
parent aa11765bee
commit 0c054c1835
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class JettyStatements {
public static Statement start() {
return new StatementList(
literal(String.format("JETTY_PORT=%d %s/bin/jetty.sh start", port, JETTY_HOME)),
literal(String.format("JETTY_PORT=%d nohup %s/bin/jetty.sh start > start.log 2>&1 < /dev/null &", port, JETTY_HOME)),
literal("test $? && sleep 1")); // in case it is slow starting the proc
}

View File

@ -303,7 +303,7 @@ public class StubComputeServiceIntegrationTest extends BaseComputeServiceLiveTes
clientNew.disconnect();
String startJetty = new StringBuilder()
.append("JETTY_PORT=8080 /usr/local/jetty/bin/jetty.sh start").append('\n')
.append("JETTY_PORT=8080 nohup /usr/local/jetty/bin/jetty.sh start > start.log 2>&1 < /dev/null &").append('\n')
.append("test $? && sleep 1").append('\n').toString();
clientNew.connect();