Hi,

Just because for the test itself it is not that much important

We can.add some log if you want, just open a jira please
Le 21 nov. 2012 22:19, "Baker, Trevor" <crba...@mail.ubc.ca> a écrit :

> Hi Devs,
>
> Using 4.5.1-SNAPSHOT
>
> Just curious why
> org.apache.openejb.arquillian.common.enrichment.OpenEJBEnricher swallows
> the exception?
>
> For example, I was injecting ABC -> Test.
>
> ABC has a field that uses a custom qualifier and the field's values are
> created/injected via javax.enterprise.inject.spi.Extension and
> javax.enterprise.inject.spi.Bean#create(CreationalContext<?> ctx). I did
> something bad (on purpose) and the create() op threw a CreationException.
>
> I didn't see anything about why ABC failed because of the swallow around
> OWBInjector.inject(...).
>
> ABC is null in Test. I was actually expecting the whole thing to fail on
> enrichment because it can't properly inject ABC into Test instead of
> silently giving the null and failing later with a NullPointerException when
> Test accesses ABC.
>
> On a side note, if I put a RuntimeException in a @PostConstruct on ABC it
> gets logged because of
> org.apache.webbeans.component.AbstractInjectionTargetBean#postConstructDefault(...)
> but I still get ABC as null in Test and the NullPointerException fail
> instead of fail at enrichment.
>
> I was hoping to see the unit test fail with a better exception than the
> NullPointerException.
>
> Thanks,
> Trev
>
>
>

Reply via email to