}
@Override
public void killProcessWithSignal(int pSignal) throws QTasteException {
if (getStatus() != ProcessStatus.RUNNING)
throw new QTasteTestFailException("Unable to stop a non running process.");
try
{
String command = "kill ";
if (pSignal > 0)
command += "-" + pSignal + " ";
if (getPid() == -1)
throw new QTasteTestFailException("Cannot kill a process if the pid cannot be found!");
command += getPid();
LOGGER.trace("Kill the process " + getInstanceId() + " with the command : " + command);
Runtime.getRuntime().exec(command);
Thread.sleep(10000);
LOGGER.trace("Process " + getInstanceId() + " status : " + getStatus());
if ( getStatus() != ProcessStatus.STOPPED )
throw new QTasteTestFailException("The process " + getInstanceId() + " is still running.");
}
catch (IOException pException)
{
LOGGER.error("Unable to kill the process " + getInstanceId() + " : " + pException.getMessage(), pException);
} catch (InterruptedException pException) {