File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
presto-native-execution/src/test/java/com/facebook/presto/nativeworker Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ protected GenericContainer<?> createFunctionServer()
197197 .withNetworkAliases ("presto-function-server" )
198198 .withCopyFileToContainer (MountableFile .forHostPath (BASE_DIR + "/testcontainers/function-server/etc" ), "/opt/function-server/etc" )
199199 .withCopyFileToContainer (MountableFile .forHostPath (BASE_DIR + "/testcontainers/function-server/entrypoint.sh" ), "/opt/entrypoint.sh" )
200- .waitingFor (Wait .forLogMessage (".* STARTED .*" , 1 ))
200+ .waitingFor (Wait .forLogMessage (".*======== REMOTE FUNCTION SERVER STARTED at: .*" , 1 ))
201201 .withStartupTimeout (Duration .ofSeconds (Long .parseLong (CONTAINER_TIMEOUT )))
202202 .withExposedPorts (functionServerPort );
203203 }
Original file line number Diff line number Diff line change @@ -193,7 +193,10 @@ public static void createCoordinatorEntryPointScript()
193193 {
194194 String scriptContent = "#!/bin/sh\n " +
195195 "set -e\n " +
196- "$PRESTO_HOME/bin/launcher run\n " ;
196+ "trap 'kill -TERM $app 2>/dev/null' TERM\n " +
197+ "$PRESTO_HOME/bin/launcher run &\n " +
198+ "app=$!\n " +
199+ "wait $app" ;
197200 createScriptFile ("testcontainers/coordinator/entrypoint.sh" , scriptContent );
198201 }
199202
@@ -203,11 +206,8 @@ public static void createFunctionServerEntryPointScript()
203206 String scriptContent = "#!/bin/sh\n " +
204207 "set -e\n " +
205208 "trap 'kill -TERM $app 2>/dev/null' TERM\n \n " +
206- "# Start Function Server\n " +
207209 "java -Dconfig=/opt/function-server/etc/config.properties " +
208210 "-jar /opt/presto-function-server-executable.jar &\n " +
209- "app=$!\n \n " +
210- "# Wait for Function Server process to exit\n " +
211211 "wait $app\n " ;
212212
213213 createScriptFile ("testcontainers/function-server/entrypoint.sh" , scriptContent );
You can’t perform that action at this time.
0 commit comments