Skip to content

TCK test for Jakarta Transactions #220 #2163

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

beikov
Copy link
Contributor

@beikov beikov commented Apr 8, 2025

Fixes Issue
No Platform TCK issue yet.

Related Issue(s)
See Jakarta Transactions issue: jakartaee/transactions#220

Describe the change
Added a test analogous to transaction timeout tests for UserTransaction to verify the readOnly hint is correctly propagated to a thread associated transaction.

CC @alwin-joseph @anajosep @arjantijms @cesarhernandezgt @dblevins @m0mus @edbratt @gurunrao @jansupol @jgallimore @kazumura @kwsutter @LanceAndersen @bhatpmk @RohitKumarJain @shighbar @gthoman @brideck @OndroMih @dmatej
@starksm64 @scottmarlow

@scottmarlow scottmarlow added the 12.0 Jakarta EE 12 Platform label Apr 8, 2025
@scottmarlow
Copy link
Contributor

Thanks @beikov for the initial pull request! I think we should see how jakartaee/transactions#220 proceeds forward.

@arjantijms arjantijms changed the title TCK test for JTA #220 TCK test for Jakarta Transactions #220 Apr 9, 2025
@tomjenkinson
Copy link
Contributor

@scottmarlow - it looks like this is getting close. Is there a recommended way/procedure to verify a new TCK test added in a pull request (which depends on an API change in a spec project) should/can be ran? I can probably update the Jakarta Transactions job to do it on the specification API project if needed but maybe there is a facility on the TCK pull request already?

@scottmarlow
Copy link
Contributor

@scottmarlow - it looks like this is getting close. Is there a recommended way/procedure to verify a new TCK test added in a pull request (which depends on an API change in a spec project) should/can be ran?

I think we will need CI setup with an EE 12 (work in progress) implementation that can run snapshot builds of the Transactions TCK tests. I think we will need a EE 12 BOM that includes the proposed Transaction SPEC API changes. From the last Transactions development release (EE 9), I think that was included in wave 4. I wonder which wave Transactions 2.1 will be part of, probably not the first wave but there is an ordering issue as Persistence is usually part of the first wave.

I can probably update the Jakarta Transactions job to do it on the specification API project if needed but maybe there is a facility on the TCK pull request already?

We need to setup https://ci.eclipse.org/jakartaee-tck/ to be able to build with the EE 12 BOM when available and compile each of the TCKs.

We haven't discussed it yet but perhaps the EE 12 Platform BOM should include all of the current EE 11 Specs except for the EE 12 Specs we are ready to test against. We probably need to bring in Spec changes in wave order to avoid build failures.

Do we need any other Specification implementation to also support read only transactions? Perhaps Connector so that datasources also support read only?

From https://github.com/jakartaee/platform-tck/actions/runs/16147957515/job/45571680186?pr=2163 I see we need jakarta.transaction:jakarta.transaction-api:jar:2.0.2-SNAPSHOT (on Eclipse staging?):

Error: Failed to execute goal on project whitebox: Could not resolve dependencies for project jakarta.tck:whitebox:jar:11.0.2-SNAPSHOT: The following artifacts could not be resolved: jakarta.transaction:jakarta.transaction-api:jar:2.0.2-SNAPSHOT (absent): Could not find artifact jakarta.transaction:jakarta.transaction-api:jar:2.0.2-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project whitebox: Could not resolve dependencies for project jakarta.tck:whitebox:jar:11.0.2-SNAPSHOT: The following artifacts could not be resolved: jakarta.transaction:jakarta.transaction-api:jar:2.0.2-SNAPSHOT (absent): Could not find artifact jakarta.transaction:jakarta.transaction-api:jar:2.0.2-SNAPSHOT

@starksm64
Copy link
Contributor

We will have to think about how to validate spec api updates against snapshot builds of api artifacts. Right now the api artifact version should be coming through the jakarta.platform:jakarta.jakartaee-bom and the version is defined in the bom/pom.xml.

It is a non-trival thing to update the api artifact to a snapshot version because it has to propagate down to the server implementation.

Probably the best we can do short term is to produce a snapshot build of the tck for implementations to validate against.

@starksm64
Copy link
Contributor

Maybe we should have a simple kitchen sink test app that touches all apis to validate the most basic failure modes.

@tomjenkinson
Copy link
Contributor

Thanks for the feedback, Scott. Just to add hopefully a little context, I feel like when adding a new feature to the API (e.g. jakartaee/transactions#220) we need to have the TCK ran somehow to verify the feature is truly feasible. Hopefully I am not off the mark here? But I wonder how other projects are achieving this. I might try to work out how to build the Jakarta Transactions TCK and integrate those steps into the pipeline in the Jakarta Transactions project....

@starksm64
Copy link
Contributor

Thanks for the feedback, Scott. Just to add hopefully a little context, I feel like when adding a new feature to the API (e.g. jakartaee/transactions#220) we need to have the TCK ran somehow to verify the feature is truly feasible. Hopefully I am not off the mark here? But I wonder how other projects are achieving this. I might try to work out how to build the Jakarta Transactions TCK and integrate those steps into the pipeline in the Jakarta Transactions project....

Agreed, but this is non-trivial because we don't officially have a server reference implementation that can be built with the proposed api artifact update. I think the best we can do is to document how to build a platform tck snapshot that picks up the proposed component artifact api update so that the component spec team can validate the platform tests against a server implementation.

@tomjenkinson
Copy link
Contributor

Please can I ask how to build the transactions TCK in a runnable manner? I used to use something including sh docker/build_standalone-tcks.sh jta where the binary would end up in jakartaee-tck/standalone-bundles/transactions-tck-*.zip but I think that seems to be different now?

@tomjenkinson
Copy link
Contributor

Please can I ask how to build the transactions TCK in a runnable manner? I used to use something including sh docker/build_standalone-tcks.sh jta where the binary would end up in jakartaee-tck/standalone-bundles/transactions-tck-*.zip but I think that seems to be different now?

Ah, I think it might be https://ci.eclipse.org/jakartaee-tck/job/11/job/tck/job/jakarta-transactions-tck-glassfish/configure - does that look right?

@scottmarlow
Copy link
Contributor

Please can I ask how to build the transactions TCK in a runnable manner? I used to use something including sh docker/build_standalone-tcks.sh jta where the binary would end up in jakartaee-tck/standalone-bundles/transactions-tck-*.zip but I think that seems to be different now?

Ah, I think it might be https://ci.eclipse.org/jakartaee-tck/job/11/job/tck/job/jakarta-transactions-tck-glassfish/configure - does that look right?

Yes that looks like a good example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12.0 Jakarta EE 12 Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants