@Ignore("OAK-1807")
@Test
public void addNodesConcurrent2() throws Exception {
final Thread mainThread = Thread.currentThread();
for (int i = 0; i < NUM_CLUSTER_NODES; i++) {
DocumentMK mk = new DocumentMK.Builder()
.setMongoDB(createConnection().getDB())
.setClusterId(i + 1).open();
mks.add(mk);
}
final Map<String, Exception> exceptions = Collections.synchronizedMap(
new HashMap<String, Exception>());
final CountDownLatch latch = new CountDownLatch(1);
final AtomicBoolean stop = new AtomicBoolean();
final UncaughtExceptionHandler ueh = new UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
RuntimeException r = new RuntimeException("Exception in thread "+t.getName(), e);
r.printStackTrace();
}
};
for (int i = 0; i < mks.size(); i++) {
DocumentMK mk = mks.get(i);
final Repository repo = new Jcr(mk.getNodeStore()).createRepository();
repos.add(repo);
for (int w = 0; w <= WORKER_COUNT; w++) {
final String name = "Worker-" + (i + 1) + "-" + (w + 1);
final Runnable r = new Runnable() {
final Session session = createAdminSession(repo);