use of com.yahoo.vespa.model.Host in project vespa by vespa-engine.
the class SearchNodeTest method requireThatPreShutdownCommandUsesPrepareRestartWhenActivated.
@Test
public void requireThatPreShutdownCommandUsesPrepareRestartWhenActivated() {
MockRoot root = new MockRoot("");
SearchNode node = createSearchNode(root, "mynode2", 4, new NodeSpec(7, 5), true);
node.setHostResource(new HostResource(new Host(node, "mynbode2")));
node.initService();
assertTrue(node.getPreShutdownCommand().isPresent());
Assert.assertThat(node.getPreShutdownCommand().get(), CoreMatchers.containsString("vespa-proton-cmd " + node.getRpcPort() + " prepareRestart"));
}
Aggregations