Skip to content

Instantly share code, notes, and snippets.

@adelapena
Created December 16, 2020 14:25
Show Gist options
  • Save adelapena/f7ce9d2602fc2e1a2ed96ae088544efc to your computer and use it in GitHub Desktop.
Save adelapena/f7ce9d2602fc2e1a2ed96ae088544efc to your computer and use it in GitHub Desktop.
Restart nodes in dtests
@Test
public void works() throws Throwable
{
try (Cluster cluster = init(Cluster.build(3).start()))
{
cluster.get(2).shutdown();
cluster.get(2).startup();
cluster.get(3).shutdown();
cluster.get(3).startup();
}
}
@Test
public void fails() throws Throwable
{
try (Cluster cluster = init(Cluster.build(3).start()))
{
cluster.get(2).shutdown();
cluster.get(3).shutdown();
cluster.get(2).startup();
cluster.get(3).startup();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment