Source:
<code>public void testTimerRequiresRecoveryFlagSet() throws Exception { Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties); environment = RuntimeEnvironmentBuilder.Factory.get() .newDefaultBuilder() .entityManagerFactory(emf) .addAsset(ResourceFactory.newClassPathResource("org/jbpm/test/functional/timer/HumanTaskWithBoundaryTimer.bpmn"), ResourceType.BPMN2) .schedulerService(globalScheduler) .userGroupCallback(userGroupCallback) .get(); manager = getManager(environment, true); RuntimeEngine runtime = manager.getRuntimeEngine(ProcessInstanceIdContext.get()); KieSession ksession = runtime.getKieSession(); Map<String, Object> params = new HashMap<String, Object>(); params.put("test", "john"); ProcessInstance processInstance = ksession.startProcess("PROCESS_1", params); Connection connection = null; Statement stmt = null; try { connection = ((DataSource)InitialContext.doLookup("jdbc/jbpm-ds")).getConnection(); stmt = connection.createStatement(); ResultSet resultSet = stmt.executeQuery("select REQUESTS_RECOVERY from QRTZ_JOB_DETAILS"); while(resultSet.next()) { boolean requestsRecovery = resultSet.getBoolean(1); assertEquals("Requests recovery must be set to true", true, requestsRecovery); } } catch (Exception e) { <START> logger.error("Error during test.", e); <END> } finally { if(stmt != null) { stmt.close(); } if(connection != null) { connection.close(); } } ksession.abortProcessInstance(processInstance.getId()); manager.disposeRuntimeEngine(runtime); }</code><technical_language>fail test this point</technical_language>

Target:
public void testTimerRequiresRecoveryFlagSet() throws Exception { Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties); environment = RuntimeEnvironmentBuilder.Factory.get() .newDefaultBuilder() .entityManagerFactory(emf) .addAsset(ResourceFactory.newClassPathResource("org/jbpm/test/functional/timer/HumanTaskWithBoundaryTimer.bpmn"), ResourceType.BPMN2) .schedulerService(globalScheduler) .userGroupCallback(userGroupCallback) .get(); manager = getManager(environment, true); RuntimeEngine runtime = manager.getRuntimeEngine(ProcessInstanceIdContext.get()); KieSession ksession = runtime.getKieSession(); Map<String, Object> params = new HashMap<String, Object>(); params.put("test", "john"); ProcessInstance processInstance = ksession.startProcess("PROCESS_1", params); Connection connection = null; Statement stmt = null; try { connection = ((DataSource)InitialContext.doLookup("jdbc/jbpm-ds")).getConnection(); stmt = connection.createStatement(); ResultSet resultSet = stmt.executeQuery("select REQUESTS_RECOVERY from QRTZ_JOB_DETAILS"); while(resultSet.next()) { boolean requestsRecovery = resultSet.getBoolean(1); assertEquals("Requests recovery must be set to true", true, requestsRecovery); } } finally { if(stmt != null) { stmt.close(); } if(connection != null) { connection.close(); } } ksession.abortProcessInstance(processInstance.getId()); manager.disposeRuntimeEngine(runtime); }