Announcement Announcement Module
Collapse
No announcement yet.
Newbie: CronTrigger Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie: CronTrigger

    Hi,

    I have configured my cronTrigger bean. Could someone please let me know how do i write junit test cases for CronTrigger bean?

    How do i access the reference of CronTrigger name and Job details inside my JUnit?

    <bean id="marketWatchSummaryCronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail">
    <ref bean="testMWSummaryJobDetail" />
    </property>
    <property name="cronExpression">
    <value>* 15 14 ? 1-12 6 *</value>
    </property>
    </bean>

    Thanks in advance.

    Essarkay

  • #2
    What is it exactly that you want to test, just that it fires? If thats the case, you could just sleep until it should have fired and check to see if it has. You could also add a listener to the scheduler. I would be helpful to know what you are wanting to do. If you are using autowiring you can inject beans into your using test.

    Comment

    Working...
    X