use of com.palantir.atlasdb.keyvalue.api.SweepResults in project atlasdb by palantir.
the class CassandraKeyValueServiceSweepTaskRunnerIntegrationTest method should_return_values_for_multiple_columns_when_sweeping.
@Test
public void should_return_values_for_multiple_columns_when_sweeping() {
createTable(TableMetadataPersistence.SweepStrategy.CONSERVATIVE);
for (int ts = 10; ts <= 150; ts += 10) {
put("row", "col1", "value", ts);
put("row", "col2", "value", ts + 5);
}
SweepResults results = completeSweep(350).get();
Assert.assertEquals(28, results.getStaleValuesDeleted());
}
use of com.palantir.atlasdb.keyvalue.api.SweepResults in project atlasdb by palantir.
the class CassandraKeyValueServiceSweepTaskRunnerIntegrationTest method should_not_oom_when_there_are_many_large_values_to_sweep.
@Test
public void should_not_oom_when_there_are_many_large_values_to_sweep() {
Assume.assumeTrue("should_not_oom test will always fail if column batch size is not set!", useColumnBatchSize);
createTable(TableMetadataPersistence.SweepStrategy.CONSERVATIVE);
long numInsertions = 100;
insertMultipleValues(numInsertions);
long sweepTimestamp = numInsertions + 1;
SweepResults results = completeSweep(sweepTimestamp).get();
Assert.assertEquals(numInsertions - 1, results.getStaleValuesDeleted());
}
Aggregations