Bug 980492 - beans.xml in test classpath is not taken into account by JBDS
beans.xml in test classpath is not taken into account by JBDS
Status: CLOSED INSUFFICIENT_DATA
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Arquillian (Show other bugs)
2.3.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Rodney Russ
thradec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-02 10:09 EDT by Ron Šmeral
Modified: 2016-10-31 21:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 14:37:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker wfk2-132 Major Closed beans.xml in test classpath is not taken into account by JBDS 2015-02-20 13:19:53 EST

  None (edit)
Description Ron Šmeral 2013-07-02 10:09:39 EDT
Description of problem:
JBDS shows a warning for all injection points in Arquillian test classes: 
"No bean is eligible for injection to the injection point [JSR-299 §5.2.1]"
The warning is shown even when there is beans.xml in src/test/resources and even for beans that reside in src/test/java or src/main/java.

Version-Release number of selected component (if applicable):
WFK 2.3.0.CR1
JBDS 7.0.0.Beta2b

How reproducible:
Import a project with CDI beans and an Arquillian test, e.g. the cdi-add-interceptor-binding quickstart.

Actual results:
The warning is shown for the field 
@Inject TestableParameterLog testableParameterLog;
in ParameterLoggerTest.

Expected results:
The warning doesn't make much sense since the bean will be injected into the test by Arquillian's enricher. Even though this is probably beyond the capability of the standard CDI validator in JBDS, an intelligent IDE could be expected to handle this.

Additional info:
A possible workaround is to add @SuppressWarnings("cdi-ambiguous-dependency") to the field or the class.
Comment 1 Ron Šmeral 2013-07-02 11:42:14 EDT
It seems the problem is somewhere else: JBDS doesn't care about beans.xml in src/test/resources.
Comment 2 Rodney Russ 2013-08-01 14:37:27 EDT
Migrated to Jira
Comment 5 JBoss JIRA Server 2015-02-20 13:19:53 EST
Rodney Russ <rruss@redhat.com> updated the status of jira WFK2-132 to Closed

Note You need to log in before you can comment on or make changes to this bug.