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 Mon, 16 Feb 2015 12:14:40 GMT
Hi,

about the mocked service registry, I don't think so. It required some
specialty that is actually only available with a OSGi framework bundle.
Therefore I doubt it.

regards, Achim

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

> Thx for your answer, I'll read your blog :-).
>
> Is it possible to imagine to have such an improvement in the mocked service
> registry ?
> I think it would be nice if we can unit test our jpa stuff (like with
> spring) without having to run a complete karaf container for each test.
>
> Arnaud
>
> 2015-02-15 18:27 GMT+01:00 Achim Nierbeck <bcanhome@googlemail.com>:
>
> > 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
> >
>



-- 

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