@Override
public void awaitStop() {
- checkState(awaitThread.compareAndSet(null, Thread.currentThread()), "There can't be more than one thread waiting for the Compute Engine Server to stop");
+ checkState(awaitThread.compareAndSet(null, Thread.currentThread()), "There can't be more than one thread waiting for the Compute Engine to stop");
checkState(ceMainThread != null, "awaitStop() must not be called before start()");
try {
startup();
return true;
} catch (Throwable e) {
- LOG.error("Compute Engine Server startup failed", e);
+ LOG.error("Compute Engine startup failed", e);
return false;
}
}
private void startup() {
- LOG.info("Compute Engine Server starting up...");
+ LOG.info("Compute Engine starting up...");
computeEngine.startup();
- LOG.info("Compute Engine Server is up");
+ LOG.info("Compute Engine is up");
}
private void waitForStopSignal() {
try {
shutdown();
} catch (Throwable e) {
- LOG.error("Compute Engine Server shutdown failed", e);
+ LOG.error("Compute Engine shutdown failed", e);
} finally {
// release thread waiting for CeServer
stopAwait();
}
private void shutdown() {
- LOG.info("Compute Engine Server shutting down...");
+ LOG.info("Compute Engine shutting down...");
computeEngine.shutdown();
}
Exception exception = Objects.firstNonNull(waitingThread1.getException(), waitingThread2.getException());
assertThat(exception)
.isInstanceOf(IllegalStateException.class)
- .hasMessage("There can't be more than one thread waiting for the Compute Engine Server to stop");
+ .hasMessage("There can't be more than one thread waiting for the Compute Engine to stop");
assertThat(waitingThread1.getException() != null && waitingThread2.getException() != null).isFalse();
}
private static MessageException parsingError(String workerCountAsStr) {
return MessageException.of(format(
- "value '%s' of property %s is invalid. It must an integer strictly greater than 0",
+ "value '%s' of property %s is invalid. It must an integer strictly greater than 0.",
workerCountAsStr,
CE_WORKERS_COUNT_PROPERTY)
);