You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brad Johnson <br...@mediadriver.com> on 2016/08/24 20:19:24 UTC

CDI!

Great job on the CDI integration with OSGi support.  It's really fantastic.


The only thing I've noticed is that the CDI runner for the unit tests will
pick up the Camel route tests but doesn't run the other tests that are
decorated with @RunWith(CamelCdiRunner.class)

Not a huge issue as the tests will still run when invoked by hand in
Eclipse but don't run out of Maven.

Brad

Re: CDI!

Posted by Brad Johnson <br...@mediadriver.com>.
CoupaClient there is an interface.  If I run this test directly from
Eclipse by clicking on it and running every goes fine.  If I use Maven
install it picks up only the RouteBuilders.  Really, not a huge issue
compare to the fine job and ease of use you've added to Camel.

@RunWith(CamelCdiRunner.class)
public class CoupaClientTests {

@Inject
Logger logger;

@Inject
CoupaClient client;
...@Test
...

Brad

On Thu, Aug 25, 2016 at 2:17 AM, Antonin Stefanutti <an...@stefanutti.fr>
wrote:

> Hi Brad,
>
> Thanks for the feedback.
>
> I’m not sure I understand the issue that you face.
>
> For example, when mvn test is executed in the example module
> camel-example-cdi-test [1], test classes annotated with
> @RunWith(CamelCdiRunner.class) get executed.
>
> Is my understanding correct?
>
> [1]: https://github.com/apache/camel/tree/master/examples/
> camel-example-cdi-test
>
> Antonin
>
> > On 24 Aug 2016, at 22:19, Brad Johnson <br...@mediadriver.com>
> wrote:
> >
> > Great job on the CDI integration with OSGi support.  It's really
> fantastic.
> >
> >
> > The only thing I've noticed is that the CDI runner for the unit tests
> will
> > pick up the Camel route tests but doesn't run the other tests that are
> > decorated with @RunWith(CamelCdiRunner.class)
> >
> > Not a huge issue as the tests will still run when invoked by hand in
> > Eclipse but don't run out of Maven.
> >
> > Brad
>
>

Re: CDI!

Posted by Antonin Stefanutti <an...@stefanutti.fr>.
Hi Brad,

Thanks for the feedback.

I’m not sure I understand the issue that you face.

For example, when mvn test is executed in the example module camel-example-cdi-test [1], test classes annotated with @RunWith(CamelCdiRunner.class) get executed.

Is my understanding correct?

[1]: https://github.com/apache/camel/tree/master/examples/camel-example-cdi-test

Antonin

> On 24 Aug 2016, at 22:19, Brad Johnson <br...@mediadriver.com> wrote:
> 
> Great job on the CDI integration with OSGi support.  It's really fantastic.
> 
> 
> The only thing I've noticed is that the CDI runner for the unit tests will
> pick up the Camel route tests but doesn't run the other tests that are
> decorated with @RunWith(CamelCdiRunner.class)
> 
> Not a huge issue as the tests will still run when invoked by hand in
> Eclipse but don't run out of Maven.
> 
> Brad