use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class SetGetEntireSSTableStreamThroughputTest method assertSetGetValidThroughput.
private static void assertSetGetValidThroughput(int throughput) {
ToolResult tool = invokeNodetool("setstreamthroughput", "-e", String.valueOf(throughput));
tool.assertOnCleanExit();
assertThat(tool.getStdout()).isEmpty();
assertGetThroughput(throughput);
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class StandaloneVerifierTest method testQuickArg.
@Test
public void testQuickArg() {
Arrays.asList("-q", "--quick").forEach(arg -> {
ToolResult tool = ToolRunner.invokeClass(StandaloneVerifier.class, arg, "system_schema", "tables");
assertThat(tool.getStdout(), CoreMatchers.containsStringIgnoringCase("quick=true"));
Assertions.assertThat(tool.getCleanedStderr()).isEmpty();
assertCorrectEnvPostTest();
tool.assertOnCleanExit();
});
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class StandaloneVerifierTest method testRepairStatusArg.
@Test
public void testRepairStatusArg() {
Arrays.asList("-r", "--mutate_repair_status").forEach(arg -> {
ToolResult tool = ToolRunner.invokeClass(StandaloneVerifier.class, arg, "system_schema", "tables");
assertThat(tool.getStdout(), CoreMatchers.containsStringIgnoringCase("mutateRepairStatus=true"));
Assertions.assertThat(tool.getCleanedStderr()).isEmpty();
assertCorrectEnvPostTest();
tool.assertOnCleanExit();
});
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class StandaloneVerifierTest method testDefaultCall.
@Test
public void testDefaultCall() {
ToolResult tool = ToolRunner.invokeClass(StandaloneVerifier.class, "system_schema", "tables");
assertThat(tool.getStdout(), CoreMatchers.containsStringIgnoringCase("using the following options"));
Assertions.assertThat(tool.getCleanedStderr()).isEmpty();
assertEquals(0, tool.getExitCode());
assertCorrectEnvPostTest();
tool.assertOnCleanExit();
}
use of org.apache.cassandra.tools.ToolRunner.ToolResult in project cassandra by apache.
the class StandaloneVerifierTest method testExtendedArg.
@Test
public void testExtendedArg() {
Arrays.asList("-e", "--extended").forEach(arg -> {
ToolResult tool = ToolRunner.invokeClass(StandaloneVerifier.class, arg, "system_schema", "tables");
assertThat(tool.getStdout(), CoreMatchers.containsStringIgnoringCase("extended=true"));
Assertions.assertThat(tool.getCleanedStderr()).isEmpty();
assertCorrectEnvPostTest();
tool.assertOnCleanExit();
});
}
Aggregations