Skip to content

Commit

Permalink
Back porting to 1.8.x:
Browse files Browse the repository at this point in the history
SchedulerServiceTest:shouldAllowTwoTasksInitMethodsToRunConcurrently
fails randomly - TRUNK-3596
  • Loading branch information
dkayiwa committed Sep 10, 2013
1 parent 9637ec5 commit 9a0012d
Showing 1 changed file with 0 additions and 4 deletions.
Expand Up @@ -24,7 +24,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.openmrs.api.context.Context;
import org.openmrs.scheduler.tasks.AbstractTask;
Expand Down Expand Up @@ -164,20 +163,17 @@ public void execute() {
* </pre>
*/
@Test
@Ignore("TRUNK-3596: SchedulerServiceTest:shouldAllowTwoTasksInitMethodsToRunConcurrently fails randomly")
public void shouldAllowTwoTasksInitMethodsToRunConcurrently() throws Exception {
SchedulerService schedulerService = Context.getSchedulerService();

TaskDefinition t3 = new TaskDefinition();
t3.setId(3);
t3.setStartOnStartup(false);
t3.setStartTime(null); // so it starts immediately
t3.setTaskClass(SimpleTask.class.getName());
t3.setProperty("id", "TASK-3");
t3.setProperty("delay", "300"); // must be longer than t4's delay

TaskDefinition t4 = new TaskDefinition();
t4.setId(4);
t4.setStartOnStartup(false);
t4.setStartTime(null); // so it starts immediately
t4.setTaskClass(SimpleTask.class.getName());
Expand Down

0 comments on commit 9a0012d

Please sign in to comment.