Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [data-dev] [External] : Re: Examples to setup TCK

Hello Denis,

I have a branch put together to fix the two issues you raised with the 1.0.1 version of the Jakarta Data TCK.
PR: https://github.com/jakartaee/data/pull/991
Branch: https://github.com/KyleAure/data/tree/tck-fixes

Would you mind pulling and building these changes locally to verify that this fix will work for you? If so, I'll go ahead and work towards getting a 1.0.2 service release published.

Thank you,
Kyle Jon Aure

On Fri, Feb 21, 2025 at 4:35 AM Denis Stepanov <denis.s.stepanov@xxxxxxxxxx> wrote:
Thanks Kyle!

From: Kyle Aure <kylejaure@xxxxxxxxx>
Sent: Thursday, February 20, 2025 7:19:21 PM
To: Denis Stepanov <denis.s.stepanov@xxxxxxxxxx>
Subject: Re: [data-dev] [External] : Re: Examples to setup TCK
 
Hello Denis,

The reason this is different is because some Jakarta Data providers (like Hibernate and JNoSQL) wanted to be able to run the TCK without having to use Arquillian to deploy
an application to a container.  While other Jakarta Data providers (like Open Liberty) wanted to be able to run the TCK by using Arquillian to deploy an application to a container.

None of the other providers expressed interest in being able to both go through the deployment process while still running the TCK on the same JVM.
I have added an issue to the Jakarta Data project to allow for this third run mode: https://github.com/jakartaee/data/issues/978

Given that you have raised this issue and the issue related to the incomplete deployment artifact for the EntityTests test class
I will also raise an issue suggesting a service release of the 1.0 TCK.

Thank you,
Kyle Jon Aure


On Thu, Feb 20, 2025 at 10:49 AM Denis Stepanov <denis.s.stepanov@xxxxxxxxxx> wrote:
Hi,
Maybe we can just have an option to avoid the custom logic you have added in JD. The same approach is working for TCK of CDI, Validation and JaxRs. Not sure why it has to be so different here.

Denis

From: Kyle Aure <kylejaure@xxxxxxxxx>
Sent: Thursday, February 20, 2025 6:44:32 PM
To: Denis Stepanov <denis.s.stepanov@xxxxxxxxxx>
Subject: Re: [data-dev] [External] : Re: Examples to setup TCK
 
Hey Denis,

I took a chance to look through your TCK project and I think I understand a bit better.
So it seems like you are using your own custom Arquillian protocol where after you run the annotation processor, recompile the classes, and send them off to a temp file.
Instead of deploying the application to a web container, you are just running the application in a separate thread?
I think the issue here is that traditionally when you use the Arquillian Servlet / REST protocol libraries, those libraries intercept the deployment and add in extra classes 
into the application to handle the `@Before` `@After` annotations.

If I understand correctly, the root of the issue here is that you are "deploying" the application to the same JVM, just a different thread.
You need to have `jakarta.tck.skip.deployment=false` so that we go through the deployment process and you can run your annotation processor.
However, setting the property also makes it so we skip the `@Before` `@After` annotations because we expect them to run AFTER deployment.
But, since the deployment is on the same JVM the same system property `jakarta.tck.skip.deployment=false` is set and therefore the `@Before` `@After` annotations cannot be processed.

I guess the options here would be to deploy to a separate JVM, or you would have to synchronize deployments and change the value of jakarta.tck.skip.deployment.

Let me know if I understood everything correctly,
Kyle Jon Aure


On Wed, Feb 19, 2025 at 6:41 PM Kyle Aure <kylejaure@xxxxxxxxx> wrote:
Sorry Denis,

I haven't gotten a chance yet. I'll have some free time tomorrow and I'll get back to you. Been in and out of the office with the flu. 

On Tue, Feb 18, 2025, 03:11 Denis Stepanov <denis.s.stepanov@xxxxxxxxxx> wrote:
Hi Kyle,

Did you manage to check it out?
I'm almost done implementing the spec. I think it would be enough to just introduce a system property to let the before/after methods run but keep the testing setup the same.

Thanks,
Denis



From: Kyle Aure <kylejaure@xxxxxxxxx>
Sent: Monday, February 10, 2025 5:17 PM
To: Denis Stepanov <denis.s.stepanov@xxxxxxxxxx>
Subject: Re: [data-dev] [External] : Re: Examples to setup TCK
 
Yes please share your respiratory with me and I'll see if I can determine the issue. 

Thanks,
Kyle

On Mon, Feb 10, 2025, 09:50 Denis Stepanov <denis.s.stepanov@xxxxxxxxxx> wrote:
Hi Kyle,

Yes, they are not running.
I’m not very familiar with the testing framework. 

I can send you a repo to try, maybe you will see what’s wrong.

Denis

From: data-dev <data-dev-bounces@xxxxxxxxxxx> on behalf of Kyle Aure via data-dev <data-dev@xxxxxxxxxxx>
Sent: Thursday, February 6, 2025 12:04:37 AM
To: data developer discussions <data-dev@xxxxxxxxxxx>
Cc: Kyle Aure <kylejaure@xxxxxxxxx>
Subject: Re: [data-dev] [External] : Re: Examples to setup TCK
 
Hello Denis, sorry for the late reply.

I'm still a bit confused by your request:

Would it be possible to add a system option to not-skip before/after etc. methods but keep the deployment as it is?

If you are deploying an application, then the @Before/@After methods should not run on the client, they should run in the container after your annotation processor runs, and after deployment.
Are you saying that after you deploy the application the @Before/@After methods are not running?

Thank you,
Kyle Jon Aure

On Thu, Jan 30, 2025 at 10:21 PM Denis Stepanov via data-dev <data-dev@xxxxxxxxxxx> wrote:
Hi Kyle,

We are doing a deployment where Micronaut will recompile the test classes with our annotation processors.


​And we replace the test instance with the instance retrieved from the bean context so all the injects can be fulfilled. We cannot skip the deployment. We do the same for other TCKs: validation, JAX-RS.

Would it be possible to add a system option to not-skip before/after etc. methods but keep the deployment as it is?

Thanks,
Denis






From: data-dev <data-dev-bounces@xxxxxxxxxxx> on behalf of Kyle Aure via data-dev <data-dev@xxxxxxxxxxx>
Sent: Thursday, January 30, 2025 6:59 PM
To: data developer discussions <data-dev@xxxxxxxxxxx>
Cc: Kyle Aure <kylejaure@xxxxxxxxx>
Subject: [External] : Re: [data-dev] Examples to setup TCK
 
Hey Denis,

Thanks for the questions.

 I'm trying to integrate the TCK for Micronaut Data but struggling with making the before/each methods run.
According to the internet those methods should be annotated with `RunAsClient` otherwise they are skipped.

How are you attempting to run the TCK? We support two modes against a container (deployed using arquillian) or standalone (on client JVM)?
The Before/After methods for all our tests are meant to be executed alongside the tests.
Therefore, I would expect the methods to be skipped on the client side when the tests run in the container, and I would expect the methods to run on the client when run in standalone mode.

It sounds like you might be attempting to run in standalone mode.  If that is the case you have to set the following JVM property:
-Djakarta.tck.skip.deployment=true

We replace the ArquillianExtension with our own custom extension that will execute these methods on the client JVM when that property is set to true.

 Do you have any examples of integrating Jakarta Data TCK?

For an example of running in standalone mode the JNoSQL project might be a good example: https://github.com/eclipse-jnosql/jnosql-extensions/blob/main/jnosql-data-tck-runner/README.adoc
For am example of running via container deployment the Open Liberty project might be a good example: https://github.com/OpenLiberty/open-liberty/blob/integration/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/tckRunner/platform/pom.xml

 BTW: EntityTests is missing `addClasses(MultipleEntityRepo.class)` possibly Coordinate as well. I had to create a custom ApplicationArchiveProcessor to make the test class inject it.

Wow thanks for pointing that out.  I'll work on fixing that!

Thank you,
Kyle Jon Aure


On Thu, Jan 30, 2025 at 10:01 AM Denis Stepanov via data-dev <data-dev@xxxxxxxxxxx> wrote:
Hi,
I'm trying to integrate the TCK for Micronaut Data but struggling with making the before/each methods run.

According to internet those methods should be annotated with `RunAsClient` otherwise they are skipped.

Do you have any examples of integrating Jakarta Data TCK?

BTW: EntityTests is missing `addClasses(MultipleEntityRepo.class)` possibly Coordinate as well. I had to create a custom ApplicationArchiveProcessor to make the test class inject it.

Thanks,
Denis
_______________________________________________
data-dev mailing list
data-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org
_______________________________________________
data-dev mailing list
data-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org

Back to the top