for (int i =0; i < NUM_THREADS; ++i) {
new Thread() {
public void run() {
synchronized (lock) {queriesInProgress++;}
try {
searcher.search(null, 0, 1, null, 1, null, null);
} catch (SearcherException e) {
e.printStackTrace();
fail();
}
synchronized (lock) {queriesInProgress--;}