1
2
3
4
5
6
7
8
9
10
11 package org.mule.providers.quartz;
12
13 import org.mule.config.ConfigurationBuilder;
14 import org.mule.config.builders.MuleXmlConfigurationBuilder;
15 import org.mule.tck.AbstractMuleTestCase;
16
17 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
18 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
19
20 public class QuartzReceiverFunctionalTestCase extends AbstractMuleTestCase
21 {
22
23 public QuartzReceiverFunctionalTestCase()
24 {
25 super();
26 this.setDisposeManagerPerSuite(true);
27 }
28
29 public void testMuleReceiverJob() throws Exception
30 {
31 CountDownLatch counter = TestComponent.QUARTZ_COUNTER;
32 assertEquals(4, counter.getCount());
33
34 ConfigurationBuilder configBuilder = new MuleXmlConfigurationBuilder();
35 configBuilder.configure("quartz-receive.xml");
36
37
38
39
40 if (!counter.await(60, TimeUnit.SECONDS))
41 {
42 fail("CountDown timed out: expected 0, value is: " + counter.getCount());
43 }
44 }
45
46 }