[
https://issues.apache.org/jira/browse/CAMEL-7628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nikolay Turpitko updated CAMEL-7628:
------------------------------------
Description:
There is, probably, incorrect test of quartz2 component:
org.apache.camel.component.quartz2.SpringQuartzPersistentStoreTest.
And, there are, seemingly, similar issues in some other tests with persistent
store.
Mentioned test used spring context xml from
org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml.
There are several issues I suspect in it:
1. Scheduler bean, which is configured to use DB, further passed to bean with
id "quartz", but in the endpoint's uri in the route the bean with id "quartz2"
used. I'm afraid, this test ignores configured quartz bean, scheduler bean,
datasource and database.
2. In this and some other tests, there is no property org.quartz.jobStore.class
in the list of quartz properties, and here:
http://www.ibm.com/developerworks/library/j-quartz/ I found that default
setting is RAMJobStore. Which means, that DB is, probably, ignored anyway.
I'm not absolutely sure about whether these are issues in particular context or
not, but when I tried to create similar test on my own, based on
SpringQuartzPersistentStoreTest, behavior was as if DB was ignored. Only when I
fixed my test's context as in SpringQuartzConsumerClusteredAppOne (and added
<prop
key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>)
it worked as expected.
was:
There is, probably, incorrect test of quartz2 component:
org.apache.camel.component.quartz2.SpringQuartzPersistentStoreTest.
And, there are, seemingly, similar issues in some other tests with persistent
store.
Mentioned test used spring context xml from
org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml.
There are several issues I suspect in it:
1. File describes <jdbc:embedded-database> but used ref to it in dataSource
property of scheduler. Other tests create intermediate bean of the type
BasicDataSource (for example, in
org/apache/camel/component/quartz2/SpringQuartzConsumerClusteredAppOne.xml).
2. Even is first point is correct, scheduler further passed to bean with id
"quartz", but in endpoint's uri in route used bean with id "quartz2". I'm
afraid, this test ignores database at all.
3. Moreover, in this and some other tests, there is no property
org.quartz.jobStore.class in the list of quartz properties, and here:
http://www.ibm.com/developerworks/library/j-quartz/ I found that default
setting is RAMJobStore. Which means, that DB is ignored once again.
I'm not absolutely sure about whether these are issues in particular context or
not, but when I tried to create similar test on my own, based on
SpringQuartzPersistentStoreTest, behavior was as if DB was ignored. Only when I
fixed my test's context as in SpringQuartzConsumerClusteredAppOne (and added
<prop
key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>)
it worked as expected.
> Incorrect test of quartz2 component
> -----------------------------------
>
> Key: CAMEL-7628
> URL: https://issues.apache.org/jira/browse/CAMEL-7628
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz2
> Affects Versions: 2.14.0
> Reporter: Nikolay Turpitko
>
> There is, probably, incorrect test of quartz2 component:
> org.apache.camel.component.quartz2.SpringQuartzPersistentStoreTest.
> And, there are, seemingly, similar issues in some other tests with persistent
> store.
> Mentioned test used spring context xml from
> org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml.
> There are several issues I suspect in it:
> 1. Scheduler bean, which is configured to use DB, further passed to bean with
> id "quartz", but in the endpoint's uri in the route the bean with id
> "quartz2" used. I'm afraid, this test ignores configured quartz bean,
> scheduler bean, datasource and database.
> 2. In this and some other tests, there is no property
> org.quartz.jobStore.class in the list of quartz properties, and here:
> http://www.ibm.com/developerworks/library/j-quartz/ I found that default
> setting is RAMJobStore. Which means, that DB is, probably, ignored anyway.
> I'm not absolutely sure about whether these are issues in particular context
> or not, but when I tried to create similar test on my own, based on
> SpringQuartzPersistentStoreTest, behavior was as if DB was ignored. Only when
> I fixed my test's context as in SpringQuartzConsumerClusteredAppOne (and
> added <prop
> key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>)
> it worked as expected.
--
This message was sent by Atlassian JIRA
(v6.2#6252)