private static final int COMMITS_PER_WRITER = 100;
@Test
public void concurrentCommits() throws Exception {
final MongoNodeStore store = new MongoMK.Builder().getNodeStore();
ChangeDispatcher dispatcher = new ChangeDispatcher(store.getRoot());
AtomicBoolean running = new AtomicBoolean(true);
final CommitQueue queue = new CommitQueue(store, dispatcher);
final List<Exception> exceptions = Collections.synchronizedList(new ArrayList<Exception>());
Closeable observer = dispatcher.addObserver(new Observer() {
private Revision before = new Revision(0, 0, store.getClusterId());
@Override
public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
MongoNodeState after = (MongoNodeState) root;