Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] : Re: Review of Platform TCK removal of duplicate Jakarta JSON Binding tests

Scott K,

Thanks for providing the detail on how Batch is able to accomplish it!  This finally makes more sense.

 

The JSON-B standalone TCK doesn't provide an extension to use arquillian like the Batch TCK does or document the approach, so the EE server is currently on its own to figure all of that out.  This is all fine if running the standalone TCK against an EE server a requirement, which I think was the assumption of the JSON-B group when the change was made, and may turn out to be the final answer on this.

 

If it doesn’t end up being the case that the tests remaining in the JSON-B Platform TCK are all that is required of a Jakarta EE server to claim compatibility, and the JSON-B Standalone TCK also needs to be run against EE servers, then the JSON-B Standalone TCK would need to do one or the other of the following:

  • Provide the extension as Batch TCK does, or
  • In the documentation on how to run the TCK, within a section for running in an EE server, include instructions on how to provide the extension to enable arquillian, which could possibly be by pointing to an example.

 

Scott M,

I’m really sorry that it continues to be unclear to me if the JSON-B Standalone TCK is a requirement for EE servers in addition to the JSON-B Platform TCK which we know is a requirement.  When I read the link you posted on Platform Specification requirements  all I’m able to determine is that the JSON-B API itself must be supported, but not specifically which test suites are required of an EE server to demonstrate it.

 

 

From: jakartaee-platform-dev <jakartaee-platform-dev-bounces@xxxxxxxxxxx> on behalf of Scott Kurz <skurz@xxxxxxxxxx>
Reply-To: jakartaee-platform developer discussions <jakartaee-platform-dev@xxxxxxxxxxx>
Date: Tuesday, March 1, 2022 at 2:48 PM
To: jakartaee-platform developer discussions <jakartaee-platform-dev@xxxxxxxxxxx>, arjan tijms <arjan.tijms@xxxxxxxxx>
Subject: [EXTERNAL] Re: [jakartaee-platform-dev] : Re: Review of Platform TCK removal of duplicate Jakarta JSON Binding tests

 

It might help to detail how the Batch Standalone TCK solves the problem of allowing a set of JUnit 5 tests to be executed via Arquillian. 

(This work was mostly done by Ondro and I know he was thinking it could hopefully be generalized soon to other specs.)

 

We first extend JUnit 5 to use Arquillian with: META-INF/services/org.junit.jupiter.api.extension.Extension

in our extension module: https://github.com/eclipse-ee4j/batch-tck/tree/master/jakarta.batch.arquillian.extension

(Let me stop and say this assumes your target runtime already has an Arquillian adapter which, e.g. Open Liberty does).

 

We then extend Arquillian to build a ShrinkWrap app using its Maven dependencies

https://github.com/eclipse-ee4j/batch-tck/blob/master/jakarta.batch.arquillian.extension/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension

https://github.com/eclipse-ee4j/batch-tck/blob/master/jakarta.batch.arquillian.extension/src/main/java/ee/jakarta/tck/batch/arquillian/ArquillianExtension.java

 

We have another layer which allows for iterating through the “vehicles” (that term purposely copied forward from the Platform TCK) of Servlet or EJB, which translate to executing the tests in-container.

In the “Servlet” vehicle test the Batch test is invoked from an Arquillian test servlet;  in the “EJB” vehicle test the test servlet calls a local EJB then the Batch test.

You may or may not have a similar requirement with JSONB (I didn’t check).  If you can do all the tests out of a servlet that would certainly simplify things.

 

The iteration through the “vehicles” setting up test context is done partly via JUnit 5 “InvocationInterceptors” in :

https://github.com/eclipse-ee4j/batch-tck/blob/master/jakarta.batch.tck.util/

 

Though we have doc in our TCK reference guide it ends up surfacing the details through the specifics of the Batch TCK.  We don’t document the extension layer in any generic way.


But hopefully this helps as a pointer and maybe further discussion point.

Scott Kurz

 

 

 

 

From: jakartaee-platform-dev <jakartaee-platform-dev-bounces@xxxxxxxxxxx> On Behalf Of Romain Manni-Bucau
Sent: Tuesday, March 1, 2022 1:01 PM
To: arjan tijms <arjan.tijms@xxxxxxxxx>
Cc: jakartaee-platform developer discussions <jakartaee-platform-dev@xxxxxxxxxxx>
Subject: Re: [jakartaee-platform-dev] [External] : Re: Review of Platform TCK removal of duplicate Jakarta JSON Binding tests

 

Hi,

 

Test kit is a junit5 which means it is "standalone" by default but also means you can integrate tests with arquillian if you need registering ArquillianExtension as implicit - or what I was thinking to, a container specific extension to run embedded or remotely. I don't think it needs to be referenced in the guide since it is part of the vendor dependent setup and there is no particular TCK SPI needed but if it helps it can probably.


Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book

 

 

Le mar. 1 mars 2022 à 18:58, arjan tijms <arjan.tijms@xxxxxxxxx> a écrit :

Hi

 

On Tue, Mar 1, 2022 at 4:48 PM Romain Manni-Bucau <rmannibucau@xxxxxxxxx> wrote:

Hi,

 

just to clarify that standalone tests can be ran against any server thanks the runner and without any change so I think we cover all the mentionned case already and implementations have no blocker at all as already proven by MP and EE server

 

Sounds good, how does that work? The user guide only seems to refer to putting a .jar on your classpath and running against that. I didn't see it mention a server, but maybe I missed it. Do you have an example of running it against an MP or EE server?

 

Thanks!

 

Kind regards,

Arjan

 

 


Back to the top