@Test
@Ignore("OAK-532") // FIXME OAK-532
public void journalConsistency() throws Exception {
while (true) {
final MicroKernel mk1 = new MicroKernelImpl();
final String rev = mk1.commit("", "+\"/a\":{}", null, null);
Thread t1 = new Thread("t1") {
@Override
public void run() {
try {
String r2 = mk1.commit("", "-\"/a\"+\"/c\":{}", rev, null);
}
catch (MicroKernelException ignore) { }
}
};
Thread t2 = new Thread("t2") {
@Override
public void run() {
try {
String r2 = mk1.commit("", "-\"/a\"+\"/b\":{}", rev, null);
}
catch (MicroKernelException ignore) { }
}
};
t1.start();
t2.start();
t1.join();
t2.join();
String journal = mk1.getJournal(rev, null, null);
int c = count("-\\\"/a\\", journal);
assertEquals(1, c);
}
}