for (int i = 0 ; i < 5 ; i++)
CommitLog.instance.add(rm2);
Assert.assertEquals(2, CommitLog.instance.activeSegments());
ReplayPosition position = CommitLog.instance.getContext();
for (Keyspace ks : Keyspace.system())
for (ColumnFamilyStore syscfs : ks.getColumnFamilyStores())
CommitLog.instance.discardCompletedSegments(syscfs.metadata.cfId, position);
CommitLog.instance.discardCompletedSegments(cfs2.metadata.cfId, position);
Assert.assertEquals(1, CommitLog.instance.activeSegments());