-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCK Challenge: com.ibm.jbatch.tck.tests.jslxml.CDITests#testCDILookup(...) #71
Comments
Is there anything we need to do here? @scottkurz |
scottkurz
added a commit
to scottkurz/batch-tck
that referenced
this issue
Mar 28, 2024
Signed-off-by: Scott Kurz <[email protected]>
No, I was actually just working on this. I had to grab some time to be able to do a few related tasks, building up to getting a release out the door soon. I will ask you to review the specification text change as well when I complete that. |
scottkurz
added a commit
to scottkurz/batch-api
that referenced
this issue
Mar 28, 2024
…akartaee/batch-tck#71 Signed-off-by: Scott Kurz <[email protected]>
Posted PR for related spec change at jakartaee/batch#211 |
scottkurz
added a commit
to scottkurz/batch-api
that referenced
this issue
Mar 28, 2024
…akartaee/batch-tck#71 Signed-off-by: Scott Kurz <[email protected]>
scottkurz
added a commit
to scottkurz/batch-api
that referenced
this issue
Apr 3, 2024
…akartaee/batch-tck#71 Signed-off-by: Scott Kurz <[email protected]> Make most minimal change possible (just a removal) Signed-off-by: Scott Kurz <[email protected]>
scottkurz
added
the
accepted
Has a specific meaning in TCK process - used for TCK challenge that was accepted
label
Apr 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The relevant specification version and section number(s)
The coordinates of the challenged test(s)
The exact TCK version
2.1.1
The implementation being tested, including name and company
Apache Tomee 10.0.0-M1-SNAPSHOT (specifcally: Geronimo BatchEE 2.0.0-SNAPSHOT), The Apache Software Foundation
A full description of why the test is invalid and what the correct behavior is believed to be
Argument 1: Undefined CDI behaviour
As dicussed in #69, the test
com.ibm.jbatch.tck.tests.jslxml.CDITests#testCDILookup(...)
above relies on undefined (vendor-specific) CDI behaviour.The test stated above contains the following code:
cdi.select(String.class, new BatchPropertyLiteral("prop1")).get();
depending on the CDI implementation (OWB or Weld), the following will happen:
null
InjectionPointInjectionPoint#getMember == null
.The JavaDoc of InjectionPoint or more specifically of
InjectionPoint#getMember()
does not tell us, if the return value can benull
.However, we find a code example in the interface docs:
If
InjectionPoint#getMember()
can benull
, this code example wouldthrow a
NullPointerException
. So from our point of view, Weld violatesthe current JavaDoc of InjectionPoint by injecting a "fake"
InjectionPoint without a member.
InjectionPoint#getBean
can returnnull
and it is stated, any othermethod can't - intentionally cause an Instance only defines an
InjectionPoint when there is one.
This is now also discussed in jakartaee/cdi#779
Argument 2: Definition of
@BatchProperty
The spec says the following about
@BatchProperty
quoting fromfrom https://jakarta.ee/specifications/batch/2.1/jakarta-batch-spec-2.1#batchproperty-definition
from https://jakarta.ee/specifications/batch/2.1/jakarta-batch-spec-2.1#method-parameter-and-constructor-parameter-injection-with-explicit-name
Given those two quotes, the valid options for injecting a
@BatchProperty
are:but no
CDI.current().select(...)
/ dynamic CDI lookups as tested incom.ibm.jbatch.tck.tests.jslxml.CDITests#testCDILookup(...)
although dynamic CDI lookups are mentioned in https://jakarta.ee/specifications/batch/2.1/jakarta-batch-spec-2.1#consequences-and-suggested-patterns - this contradiction could maybe adressed with jakartaee/batch#209Resolution / Solution
Maybe allow an exclusion of the test for now and than follow up with #70
Any supporting material; debug logs, test output, test logs, run scripts, etc.
InjectionPoint
works when a bean is obtained via CDI.current() cdi#779The text was updated successfully, but these errors were encountered: