}
@Test
public void testTruncatedReplay() throws InterruptedException, ExecutionException
{
CellNameType comparator2 = Keyspace.open("Keyspace1").getColumnFamilyStore("Standard2").metadata.comparator;
CellNameType comparator3 = Keyspace.open("Keyspace1").getColumnFamilyStore("Standard3").metadata.comparator;
// Generate 2000 mutations (1000 batchlog entries) and put them all into the batchlog.
// Each batchlog entry with a mutation for Standard2 and Standard3.
// In the middle of the process, 'truncate' Standard2.
for (int i = 0; i < 1000; i++)
{
Mutation mutation1 = new Mutation("Keyspace1", bytes(i));
mutation1.add("Standard2", comparator2.makeCellName(bytes(i)), bytes(i), 0);
Mutation mutation2 = new Mutation("Keyspace1", bytes(i));
mutation2.add("Standard3", comparator3.makeCellName(bytes(i)), bytes(i), 0);
List<Mutation> mutations = Lists.newArrayList(mutation1, mutation2);
// Make sure it's ready to be replayed, so adjust the timestamp.
long timestamp = System.currentTimeMillis() - DatabaseDescriptor.getWriteRpcTimeout() * 2;