camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: camel jpa blueprint unit test
Date Sun, 15 Feb 2015 17:27:50 GMT
Hi,

the CamelBlueprintTestSupport does internally use the tinySR as OSGi
service registry mock. With that setup it's not possible to
have a running JPA test. This is because the aries blueprint JPA bundles
expect certain environment parameters which aren't just full filled. That's
the reason I wrote this blog post [1].
If you want to debug the Karaf instance you'll need to do "Remote"
debugging, start your test with debug mode on, and attach your debugger.
Unfortunately that's the only way right now.

regards, Achim

[1] -
http://notizblog.nierbeck.de/2013/08/testing-camel-jpa-routes-with-pax-exam-and-karaf/
[2] - https://github.com/ANierbeck/Camel-Pax-Exam-Demo

2015-02-15 16:11 GMT+01:00 Arnaud Deprez <arnaudeprez@gmail.com>:

> Hi folks,
>
> Is there any examples of how to run JUnit tests with camel jpa and
> blueprint ?
>
> I know that we can use Pax Exam with the Karaf Container but it works in
> another process and I can't run it in debug mode easily.
>
> My goal is to create a unit test with the handsome
> CamelBlueprintTestSupport and being able to debug my code if needed.
>
> Regards,
>
> Arnaud
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message