Skip to content
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

Add tests for Jakarta EE integration of Jakarta Persistence with the CDI bean manager #1405

Open
scottmarlow opened this issue Jul 23, 2024 · 7 comments
Assignees
Labels
11.0 Issues related to the Jakarta EE 11 Platform TCK release

Comments

@scottmarlow
Copy link
Contributor

Add tests for jakartaee/platform#746

@scottmarlow scottmarlow added the 11.0 Issues related to the Jakarta EE 11 Platform TCK release label Jul 23, 2024
@scottmarlow scottmarlow self-assigned this Jul 23, 2024
@edburns
Copy link
Contributor

edburns commented Jul 23, 2024

Notes from Platform call

  • Stateless session beans have always been challenging to test robustly.
    • JPA 2.1 clarification: when you use EntityManager outside of a transaction, after each entity call, the PersistenceContext state is not preserved.

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Jul 25, 2024

Notes from Platform call

* Stateless session beans have always been challenging to test robustly.
  
  * JPA 2.1 clarification: when you use `EntityManager` outside of a transaction, after each entity call, the `PersistenceContext` state is not preserved.

Unless a persistence unit hint (e.g. extension) like jboss.as.jpa.deferdetach is used to defer the clearing/close of the persistence context until the session bean call completes.

@edburns
Copy link
Contributor

edburns commented Oct 30, 2024

Depends on #1624 .

@jhanders34
Copy link
Contributor

jhanders34 commented Dec 3, 2024

The first testing for this issue only includes EntityManager. @Inject also needs to be tested with EntityManagerFactory, CriteriaBuilder, Cache, Metamodel, SchemaManager and PersistenceUnitUtil as was just presented at JakartaOne by Gavin King.

@starksm64
Copy link
Contributor

@arjantijms
Copy link
Contributor

With #1686 and #1687, all the functionality is tested, although it a very crude way (just that the artefacts are indeed injected).

@edburns
Copy link
Contributor

edburns commented Dec 10, 2024

From 2024-12-10 Platform call:

PRs merged include qualifier scenarios, but doesn’t actually use the artifacts that are injected to make sure that they are the right injected instances for the qualifiers. The test just validates that injection happens, but not the content of the injected value.
Custom scope testing is not included yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11.0 Issues related to the Jakarta EE 11 Platform TCK release
Projects
Status: In progress
Development

No branches or pull requests

5 participants