// NOTE using persist=false so that the lock retry will have to fix the problem instead of the job poller picking it up again
GenericResultWaiter threadAWaiter = dispatcher.runAsyncWait("testServiceDeadLockRetryThreadA", null, false);
GenericResultWaiter threadBWaiter = dispatcher.runAsyncWait("testServiceDeadLockRetryThreadB", null, false);
// make sure to wait for these to both finish to make sure results aren't checked until they are done
Map<String, Object> threadAResult = threadAWaiter.waitForResult();
Map<String, Object> threadBResult = threadBWaiter.waitForResult();
List<Object> errorList = FastList.newInstance();
if (ServiceUtil.isError(threadAResult)) {
errorList.add(UtilProperties.getMessage(resource, "ServiceTestDeadLockThreadA", UtilMisc.toMap("errorString", ServiceUtil.getErrorMessage(threadAResult)), locale));
}
if (ServiceUtil.isError(threadBResult)) {