@Test
  public void testCompactorRegionMapDeletedAfterCompactionForOnlyDrfOplogAndKrfCreationCanceledByCompactionIsDone() {

    createDiskStore(70, 10000);
    Region<Object, Object> region = createRegion();
    DiskStoreImpl diskStore = ((InternalRegion) region).getDiskStore();

    // Create several oplog files (.crf and .drf) by executing put operations in defined range
    executePutsInRange0_299(region);
    await().untilAsserted(() -> assertThat(getCurrentNumberOfOplogs(diskStore)).isEqualTo(5));

    destroyEveryFifthElementInRange0_299AndEachTimePutInRange300_599(region);
    await().untilAsserted(() -> assertThat(isOplogToBeCompactedAvailable(diskStore)).isFalse());

    await().untilAsserted(
        () -> assertThat(areAllUnnecessaryObjectClearedForOnlyDrfOplog(diskStore)).isTrue());
  }
Verifies that the unnecessary memory is cleared when operational log (.crf and .drf) is
compacted.This is special scenario were creation of .krf file is cancelled by ongoing
compaction. This usually happens when new oplog is rolled out and previous oplog is
immediately marked as eligible for compaction. Compaction and .krf creation start at the
similar time and compactor cancels creation of .krf if it is executed first.

This test case covers the following scenario:

1. Create several Oplog files (.crf, .drf and .krf) by executing put operations.
2. Execute destroy operation for every fifth entry, and each time add new entry. When
it is time for oplog to roll out, the previous oplog will be immediately marked as ready
for compaction because compaction threshold is set to high value in this case. This way
we force that compaction cancel creation of .krf file. Compaction will
delete only .crf file (.krf was not created at all), but will not delete .drf files because
they contain destroy operations for events located in .crf files created in step 1.
3. Check that unnecessary objects are cleared for theOplog that represents orphaned .drf
file (no accompanying .crf and .krf file)
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionCompactorClearsObjectThatAreNoLongerNeededIntegrationTest.java