@Test
    public void testRecoverAbNormal() throws Exception {
        this.testAppendIndex();
        {
            // Try to shutdown and recover , check flush position
            this.indexDB.shutdown();
            this.init();
            // Create abort file
            this.abortFile.create();
            this.indexDB.recover();
            assertEquals(this.indexDB.getFlushedPosition(), 212);
        }
    }
Test for Service , which enables auto flush
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/storage/db/IndexDBTest.java