[
https://issues.jboss.org/browse/WFCORE-2218?page=com.atlassian.jira.plugi...
]
Brian Stansberry commented on WFCORE-2218:
------------------------------------------
Perhaps this in ServerController
{code}
/**
* Spawns a thread to execute a given {@code restartTrigger} task and then starts a
new server
* process once the existing server exits with the usual restart exit code.
*
* @param restartTrigger a runnable that will somehow result in the existing server
process exiting with the
* restart exit code. Cannot be {@code null}
* @param timeout maximum time in ms to wait for the server process to exit
*
* @throws RuntimeException if {@code restartTrigger} throws an exception
* @throws AssertionError if {@code restartTrigger} throws an AssertionError, if the
server does not stop within
* {@code timeout} ms, or if the server's exit code is not
the one expected.
*/
public void handleServerRestart(Runnable restartTrigger, long timeout);
{code}
Ability to ask testrunner ServerController to wait for server process
exit and get the exit code
------------------------------------------------------------------------------------------------
Key: WFCORE-2218
URL:
https://issues.jboss.org/browse/WFCORE-2218
Project: WildFly Core
Issue Type: Enhancement
Components: Test Suite
Reporter: Brian Stansberry
Imagine testing the shutdown --restart CLI command in a manualmode test.
The standalone.sh script is not used so the restart won't work, as the restart logic
is in the script. But the test itself could handle the restart part if the
ServerController would let it know when the server process is stopped and what the exit
code was.
So,
1) test spawns a thread to do shutdown --restart in the CLI
2) test waits for server to stop, confirms correct exit code
3) test starts the server again
4) thread doing the shutdown --restart moves on since the server starts again
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)