-
Notifications
You must be signed in to change notification settings - Fork 39
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
Standalone TCK shouldn't require CDI SE #326
Comments
@brideck - We have observed two failures with JSONB test with Glassfish 7 Web Profile, are the two failure related to above failure?
|
Adding to above comment: |
Yes, this is exactly the sort of failure that I'm talking about. Whereas GF ships a weld-se implementation that it can add to the classpath, Open Liberty does not, and should not be required to -- EE is not a superset of SE. |
@lukasj this started as a question but implementations like GlassFish 7 Web Profile implementation do not include the The same problem will happen for a Core Profile implementation that doesn't include CDI SE implementation (e.g. |
@scottmarlow I'm not a committer on this project, so there is really not much I can do. @Verdent can you take a look? |
@scottmarlow btw I really do not think that maven is the best tool to run TCK tests against some ZIP binary. For that, I used gradle in parsson, where I can easily mix maven dependencies with local ones and alter all paths as necessary (see this if you're interested) |
My bad, I should of looked at https://projects.eclipse.org/projects/ee4j.jsonb/who
David, could you please add the |
@scottmarlow I do understand the problem, but JSONB spec also declares following |
This is what the jsonb/cdi tests that we left in the Platform TCK is designed to cover, too, right? If there's also a need to prove this function from an SE environment/perspective, then these tests could just be excluded from executions looking to supplement an EE certification effort. If CDI itself is optional, then there should also be a way to make the related tests in the TCK optional, no? Note: I fully understand that I could just pull in something like weld-se from Maven to make this all work, but should that be a requirement? |
let's get an answer to this question first. Does the spec say anywhere that CDI is optional or if CDI is available or similar thing to make it clear that CDI may not be available at runtime and when it is missing it is still fully compliant API/spec/impl combination? |
No, spec does not explicitly say, CDI is optional. Only that it supports CDI. |
From the Core Profile Specification https://github.com/eclipse-ee4j/jakartaee-platform/blob/master/specification/src/main/asciidoc/coreprofile/CoreProfileDefinition.adoc:
Also from the same Core Profile link, I think that Core Profile 10 implementations should have a way to pass the JSON-B 3.0 TCK without being required to implement jakarta.enterprise.inject.se.SeContainer. As far as Jakarta EE 10 Full Platform implementations go though, I think they do need to provide the jakarta.enterprise.inject.se.SeContainer implementation as per guidance in https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html:
|
The CDI specification also states:
The wording here of "that support" implies that not every valid CDI implementation needs to support Java SE at all. I read all of the above to mean: EE Core Profile = CDI Lite The statement in the draft Core Profile spec doc about Full CDI implementations being required to support SE seems like an overreach compared to what's in the CDI spec itself. It would be useful if a CDI spec expert chimed in with what the intention was. |
@brideck is correct in that support for SE requires support for Full, but support for Full does not require SE. The CDI TCK userguide examples for running against WildFly have the following group exclusions: Full Java EE Platform, excluded groups = se So in both the Web Profile and Full Platform, Java SE related tests are excluded. |
I noticed that as well, but I also noticed that the 4.0 TCK user guide does not exclude the 'se' tests in section 4.5, showing how to run for Web Profile. Likewise, the user guide is completely silent on how to go about running for Full Platform (implying that you shouldn't need an exclude statement at all?). It would seem that this is not a well-understood situation. |
Ok, I see. I have created this CDI TCK issue to address that: As I said in that issue, it really does not make sense for Full Platform/Web Profile implementations to imply anything about the Java SE bootstrap behavior because that is a completely separate startup behavior that cannot be configured using the same Arquillian container. |
The proposed userguide update PR is: jakartaee/cdi-tck#379 |
Hi, copying my reply to cdi-dev here:
My recommendation for the JSON-B TCK would hence be: if you want tests to exercise some CDI SE or EE integration, those should be in separate groups that can be excluded. If you use the CDI SE API to bootstrap a CDI container in order to verify CDI Lite integration, that should most likely become a TCK SPI that integrators have to implement in any way they wish (because CDI Lite doesn't have a bootstrapping API). |
FYI the two tests being challenged are:
Are we ready to accept that these tests should be excluded in a https://download.eclipse.org/jakartaee/jsonb/3.0/jakarta-jsonb-tck-3.0.1.zip release? If yes, please mark the challenge as accepted. |
I think removal is not correct in this case. These test are needed there for certification reasons etc. What could be done, is to flag them in JUnit, so they can be easily excluded out of the run if needed. Or do something similar, but I do not think removing it is the way to go. |
So the tests would default to be run but a JSON-B implementation certification request would still be accepted if their test results are missing these two (challenged) |
There needs to be a Junit CDI_SE group that can be excluded for certification of profiles/platform implementations that don't require the CDI Java SE support. |
While it is fine to run in standalone, it is a vendor subset of jsonb which requires cdi so test must pass with cdi but not use CDI SeContainer/Initializer since requirement is for its runtime not to bootstrap CDI. Side note: CDI Lite is NOT required by JSON-B and must not be enforced for now. |
jakartaee/platform-tck#1062 shows how the (TCK) user can exclude the JSON-B CDI_SE tests via maven-surefire-plugin exclude. If The JSON-B team decides to accept this as a valid workaround for this challenge, then the challenge could be marked as accepted with the workaround being:
|
Folks, I don't see it as a challenge. You are just trying to use JSONB TCKs a way they are not designed to be used. See my comment on Scott's PR: jakartaee/platform-tck#1062 (comment) Short summary: Don't run standalone tests on your platform implementation, run only the platform bundle. Standalone tests are designed to test JSONB implementation (not a PLATFORM implementation), they use JUnit and work on Java SE environment. You should certify your JSONB implementation separately. If you use Yasson, you don't need to do it because it's certified already. |
After doscussing this challenge with @scottmarlow and @brideck we agreed that everything works as expected. I am not accepting the challenge. |
Just to clarify, the JSON-B Standalone TCK tests currently do need a SE_CDI implementation to pass, like Weld. 👍 for addressing this later! |
Open Liberty would like to run this TCK against what we ship to ensure that we've pulled our JSON implementations into the product correctly. However, because of the TCK's dependency on an SE implementation of CDI, we can't currently do this.
Attempts to run in this fashion result in the following exception:
There are two tests in the TCK (both found in https://github.com/eclipse-ee4j/jsonb-api/tree/master/tck/src/main/java/ee/jakarta/tck/json/bind/cdi/customizedmapping) that define fields of this type. Should there be tests that are verifying integration with other Jakarta EE specs in a standalone TCK that can't run in an EE environment?
The text was updated successfully, but these errors were encountered: