@Test
public void testConcurrentSearchIsDescendantAndIteratorResults() throws InterruptedException, ExecutionException {
ExecutorService executor = Executors.newFixedThreadPool(300);
ExecutorCompletionService<Boolean> service = new ExecutorCompletionService<Boolean>(executor);
StopWatch stopWatch = new StopWatch("testConcurrentSearchIsDescendantAndIteratorResults");
stopWatch.start(Thread.currentThread().getName() + " search jnt:page nodes is descendant site node, iterator results for query results size = -1 ");
for (int i = 0; i < 1000; i++) {
service.submit(new SearchIteratorResults("select * from [jnt:page] as page where isdescendantnode(page, 'path') "), Boolean.TRUE);
}
for (int i = 0; i < 1000; i++) {
Boolean aBoolean = service.take().get();