raft: flush the commit to fix a race in test