@Test
public void testTxnFailure() throws Exception {
long count = 1;
File tmpDir = ClientBase.createTmpDir();
FileTxnSnapLog logFile = new FileTxnSnapLog(tmpDir, tmpDir);
DataTree dt = new DataTree();
dt.createNode("/test", new byte[0], null, 0, -1, 1, 1);
for (count = 1; count <= 3; count++) {
dt.createNode("/test/" + count, new byte[0], null, 0, -1, count,
System.currentTimeMillis());
}
DataNode zk = dt.getNode("/test");
// Make create to fail, then verify cversion.
LOG.info("Attempting to create " + "/test/" + (count - 1));
doOp(logFile, OpCode.create, "/test/" + (count - 1), dt, zk, -1);