deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gpetra...@apache.org>
Subject Re: Strange behaviour with @RunWith(CdiTestRunner.class)
Date Wed, 26 Oct 2016 17:53:58 GMT
hi ludovic,

please move this thread to the owb-users-list.

regards,
gerhard



2016-10-26 12:53 GMT+02:00 l.penet@senat.fr <l.penet@senat.fr>:

> Hi.
>
> I am running tests with the help of
>
>     @RunWith(CdiTestRunner.class)
>
> I am using in this project :
>
> - DeltaSpike 1.7.0
>
> - OpenWebBeans 1.6.2.
>
> (among a lot of other stuff as almost always in java)
>
> The target container is Tomcat 8.5.6, but it does not seem important there.
>
>
> I have no problem as long as I inject only beans from dependencies.
>
> However, in my current project, I have one bean injecting another from the
> top level project and it fails.
>
> So, I fired my debugger and noticed that :
>
> - OWB uses a fake servlet context, as the servlet spec is detected ;
>
> - classes from my war are not added, as this is a fake context and there
> is no war
>
> - in AbstractMetaDataDiscovery. registerBeanArchives, there is no
> classpath containing my classes that is scanned for beans.xml, and so, my
> classes are never added.
>
> I can, as a workaround, put my beans in a dependency... But is there
> something I can do to get it working there ?
>
> Thanks in advance,
>
> Ludovic
>
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>

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