Method test1SessionTestDoSomething
// Threads array
SessionTest[] clients = new SessionTest[numThreads];
for (int i = 0; i < numThreads; i++) {
clients[i] = new SessionTest();
}
for (int j = 0; j < numThreads; j++) {
clients[j].start();
try {
Thread.currentThread().sleep(150);
} catch (InterruptedException e) {
System.out.println("Threads interrupted");
}
}
try {
synchronized (lock) {
while (count != 0) {
lock.wait();
}
}
} catch (InterruptedException ie) {
System.out.println("Threads interrupted");
}
System.out.println("Succeeded " + succeeded + " times.");
System.out.println("Failed " + failed + " times.");
assertTrue("found session failures", (failed == 0));