use of com.palantir.atlasdb.cli.runner.InMemoryTestRunner in project atlasdb by palantir.
the class TestFastForwardTimestampCommand method fetchCurrentTimestamp.
private static long fetchCurrentTimestamp() throws Exception {
InMemoryTestRunner fetchRunner = new InMemoryTestRunner(FetchTimestamp.class, TIMESTAMP_GROUP, FETCH_COMMAND);
AtlasDbServices services = fetchRunner.connect(moduleFactory);
return services.getTimestampService().getFreshTimestamp();
}
use of com.palantir.atlasdb.cli.runner.InMemoryTestRunner in project atlasdb by palantir.
the class TestFastForwardTimestampCommand method checkFastForward.
private static void checkFastForward(long target, long expected) throws Exception {
InMemoryTestRunner runner = makeRunnerWithTargetTimestamp(target);
AtlasDbServices atlasDbServices = runner.connect(moduleFactory);
String response = runner.run();
// Unintuitive, but is consistent with existing CLI behaviour.
assertThat(response).contains("Timestamp successfully fast-forwarded to " + target);
assertThat(atlasDbServices.getTimestampService().getFreshTimestamp()).isEqualTo(expected + 1);
}
Aggregations