Re: Intermittent test failures

2013-03-13 Thread cheekychops
Thanks Claus, that was it!

Since the project uses camel-blueprint and camel-blueprint-test, I made the
following exclusion and the problem went away:

dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-blueprint/artifactId
/dependency
dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-test-blueprint/artifactId
scopetest/scope
exclusions
exclusion

artifactIdorg.apache.aries.blueprint/artifactId

groupIdorg.apache.aries.blueprint/groupId
/exclusion
/exclusions
/dependency




--
View this message in context: 
http://camel.465427.n5.nabble.com/Intermittent-test-failures-tp5728946p5729079.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz component query

2013-03-13 Thread cheekychops
I expect that if you configured quartz to use a clustered jobstore, and
connected to the same database with another quartz instance you could add
more triggers, but I don't think the Quartz Component was really designed to
work this way.

Note that its not recommended to insert triggers directly into the database,
you should use the Quartz API.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-component-query-tp5728942p5729086.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Intermittent test failures

2013-03-12 Thread cheekychops
I've spent a whole day trying to get this to work, including upgrading to the
latest Camel (2.11-SNAPSHOT) and ActiveMQ (5.8-SNAPSHOT) to no avail.

The exact same tests work perfectly when the routes are configured in a
Spring definition and tested with the help of CamelSpringTestSupport.

Other posts in this forum seem to suggest that CamelBlueprintTestSupport
introduces a race condition when loading the context. Despite a fix being
committed for that, I wouldn't be surprised if this is causing my issue - I
sometimes see duplicated lines in the log like this:

[ Blueprint Extender: 1] ManagementStrategyFactory  INFO  JMX is
disabled.
[ Blueprint Extender: 3] ManagementStrategyFactory  INFO  JMX is
disabled.
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  Apache
Camel 2.10.0.fuse-71-047 (CamelContext: schedulingContext) is starting
[ Blueprint Extender: 3] BlueprintCamelContext  INFO  Apache
Camel 2.10.0.fuse-71-047 (CamelContext: schedulingContext) is starting
[ Blueprint Extender: 1] Activator  INFO  Found
2 @Converter classes to load
[ Blueprint Extender: 1] Activator  INFO  Found
0 @Converter classes to load
[ Blueprint Extender: 3] Activator  INFO  Found
2 @Converter classes to load
[ Blueprint Extender: 3] Activator  INFO  Found
0 @Converter classes to load
[ Blueprint Extender: 3] StdSchedulerFactoryINFO  Using
default implementation for ThreadExecutor
[ Blueprint Extender: 1] StdSchedulerFactoryINFO  Using
default implementation for ThreadExecutor




--
View this message in context: 
http://camel.465427.n5.nabble.com/Intermittent-test-failures-tp5728946p5729024.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Intermittent test failures

2013-03-11 Thread cheekychops
I have a test class which extends CamelBlueprintTestSupport which has a
number of test methods on it. The tests follow the normal pattern: set mock
expectations/do stuff/make assertions. Sometimes when I run the tests they
all pass, sometimes some of them fail. When they fail I always get the
following output in the log:

[ Blueprint Extender: 3] BlueprintContainerImpl INFO  Bundle
SchedulingRouteTest is waiting for namespace handlers
[http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0,
http://camel.apache.org/schema/blueprint]
[ Blueprint Extender: 3] BlueprintContainerImpl INFO  Bundle
SchedulingRouteTest is waiting for namespace handlers
[http://camel.apache.org/schema/blueprint]
Test bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle,
Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec,
Bundle-Version=0.2.1
ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle:
de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle:
org.apache.camel.camel-core [6], symbolicName: org.apache.camel.camel-core
ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle:
org.apache.camel.camel-spring [9], symbolicName:
org.apache.camel.camel-spring
ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer],
bundle: org.apache.aries.blueprint [37], symbolicName:
org.apache.aries.blueprint
ServiceReference: [org.fusesource.hawtdispatch.Dispatcher], bundle:
org.fusesource.hawtdispatch.hawtdispatch [26], symbolicName:
org.fusesource.hawtdispatch.hawtdispatch
ServiceReference: [org.osgi.service.cm.ConfigurationAdmin], bundle:
org.apache.felix.configadmin [48], symbolicName:
org.apache.felix.configadmin
ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle:
org.apache.camel.camel-spring [9], symbolicName:
org.apache.camel.camel-spring
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle:
org.apache.aries.blueprint [37], symbolicName: org.apache.aries.blueprint
ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle:
org.apache.activemq.activemq-camel [7], symbolicName:
org.apache.activemq.activemq-camel
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle:
org.apache.camel.camel-blueprint [35], symbolicName:
org.apache.camel.camel-blueprint
ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle:
org.apache.activemq.activemq-camel [7], symbolicName:
org.apache.activemq.activemq-camel
ServiceReference: [org.apache.aries.proxy.ProxyManager], bundle:
org.apache.aries.proxy.impl [39], symbolicName: org.apache.aries.proxy.impl
ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle:
org.apache.camel.camel-core [6], symbolicName: org.apache.camel.camel-core
ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle:
org.apache.camel.camel-core [6], symbolicName: org.apache.camel.camel-core
ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle:
org.apache.felix.configadmin [48], symbolicName:
org.apache.felix.configadmin
ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle:
de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
ServiceReference: [org.apache.aries.blueprint.services.ParserService],
bundle: org.apache.aries.blueprint [37], symbolicName:
org.apache.aries.blueprint
ServiceReference: [org.osgi.framework.hooks.bundle.EventHook], bundle:
org.apache.aries.blueprint [37], symbolicName: org.apache.aries.blueprint
ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle:
org.apache.camel.camel-jaxb [19], symbolicName: org.apache.camel.camel-jaxb
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle:
org.apache.aries.blueprint [37], symbolicName: org.apache.aries.blueprint
ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer],
bundle: org.apache.camel.camel-blueprint [35], symbolicName:
org.apache.camel.camel-blueprint
ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle:
org.apache.camel.camel-jms [8], symbolicName: org.apache.camel.camel-jms
ServiceReference: [org.osgi.service.startlevel.StartLevel], bundle:
de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle:
org.apache.camel.camel-jaxb [19], symbolicName: org.apache.camel.camel-jaxb
[  main] SchedulingRouteTestINFO 

[  main] SchedulingRouteTestINFO 
Testing done:
shouldDisableJob(com.monitise.ep.scheduling.impl.SchedulingRouteTest)
[  main] SchedulingRouteTestINFO  Took:
30.148 seconds (30148 millis)
[  main] SchedulingRouteTestINFO 

direct-vm and CamelBlueprintTestSupport

2013-03-01 Thread cheekychops
Hi, 

I've just split a camel context in two and connected them using direct-vm
like this:

camelContext id=blueprintJmsContext
xmlns=http://camel.apache.org/schema/blueprint; trace=false
route id=inbound
from uri=activemq:inbound /
to uri=direct-vm:validator /
/route
/camelContext

camelContext id=blueprintContext
xmlns=http://camel.apache.org/schema/blueprint; trace=false
route id=validator
from uri=direct-vm:validator /
...
/route
/camelContext

Now my unit tests on blueprintContext fail randomly (sometimes they pass),
with errors like:

java.lang.IllegalStateException: A consumer Consumerdirect-vm://validator
already exists from CamelContext: blueprintContext. Multiple consumers not
supported
at
org.apache.camel.component.directvm.DirectVmComponent.addConsumer(DirectVmComponent.java:57)

Is there a way to avoid this with CamelBlueprintTestSupport?

Many thanks,

Colin Smith




--
View this message in context: 
http://camel.465427.n5.nabble.com/direct-vm-and-CamelBlueprintTestSupport-tp5728344.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: direct-vm and CamelBlueprintTestSupport

2013-03-01 Thread cheekychops
This is part of a FUSE ESB deployment, so its version 2.10.0.fuse-71-047 of
Camel.

My test class extends CamelBlueprintTestSupport. I use a producerTemplate to
send to the endpoint, like this:

@Produce(uri = direct-vm:validator)
protected ProducerTemplate validatorProducer;
...
Response response = validatorProducer.requestBody(request,
Response.class);

Different test methods fail each time I run the test.

I get similar results (random tests failing, and the error No consumers
available on endpoint: Endpoint[direct://validator]) when I try to use
direct:validator. Someone on my team has suggested that it is not possible
to start a route with only direct: endpoints, which is what I'm trying to
do. 

My reason for doing this is to try to separate out all the activemq config
into its own route, and bridge the two contexts using direct-vm. I'm pretty
new to this so there may be a better way.



--
View this message in context: 
http://camel.465427.n5.nabble.com/direct-vm-and-CamelBlueprintTestSupport-tp5728344p5728355.html
Sent from the Camel - Users mailing list archive at Nabble.com.