use of org.apache.zookeeper.txn.TxnDigest in project zookeeper by apache.
the class FileTxnSnapLogTest method attemptAutoCreateDB.
private void attemptAutoCreateDB(File dataDir, File snapDir, Map<Long, Integer> sessions, String autoCreateValue, long expectedValue) throws IOException {
sessions.clear();
FileTxnSnapLog fileTxnSnapLog = createFileTxnSnapLogWithAutoCreateDB(dataDir, snapDir, autoCreateValue);
long zxid = fileTxnSnapLog.restore(new DataTree(), sessions, new FileTxnSnapLog.PlayBackListener() {
@Override
public void onTxnLoaded(TxnHeader hdr, Record rec, TxnDigest digest) {
// empty by default
}
});
assertEquals(expectedValue, zxid, "unexpected zxid");
}
Aggregations