@Test
  public void test09() throws IllegalPathException {
    IMemTable memTable0 = new PrimitiveMemTable(databasePath, dataRegionId);
    walNode1.onMemTableCreated(memTable0, logDirectory1 + "/" + "fake.tsfile");
    walNode1.log(
        memTable0.getMemTableId(),
        generateInsertRowNode(devicePath, System.currentTimeMillis(), 1));
    walNode1.rollWALFile();

    IMemTable memTable2 = new PrimitiveMemTable(databasePath, dataRegionId);
    walNode1.onMemTableCreated(memTable2, logDirectory1 + "/" + "fake.tsfile");
    walNode1.log(
        memTable2.getMemTableId(),
        generateInsertRowNode(devicePath, System.currentTimeMillis(), 2));
    walNode1.log(
        memTable2.getMemTableId(),
        generateInsertRowNode(devicePath, System.currentTimeMillis(), 3));
    Awaitility.await().until(() -> walNode1.isAllWALEntriesConsumed());

    ConsensusReqReader.ReqIterator itr3 = walNode1.getReqIterator(1);
    Assert.assertFalse(itr3.hasNext());
  }
Ensure that files that can be cleaned can be deleted: <br>
1. _0-0-1.wal: memTable0 <br>
2. roll wal file <br>
3. _2-1-0.wal: memTable2 <br>
4. wait until all walEntry consumed <br>
5. delete outdated wal files
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WalDeleteOutdatedNewTest.java