jakartaee / platform-tck

Jakartaee-tck
Other
124 stars 103 forks source link

Investigate impact of removing support for optional EJB 2.x features (homes, CIs, etc.) #1250

Open brideck opened 3 months ago

brideck commented 3 months ago

There's an ongoing discussion around if/when support for the currently optional EJB 2.x features should be removed from the platform spec and therefore from the TCK. Doing so would have a lot broader impact in the TCK then simply affecting the obvious ejb tests. As we investigate this impact, we'll keep a growing list of tests and proposed plans for them here. Discussion can follow in the comments of this issue.

appclient.deploy.compat -- assembly.compat.cocktail.compat -- assembly.compat.single.compat -- assembly.compat.standalone.jar.compat -- assembly.compat.standalone.war.compat* -- These tests need to be trimmed and updated to cover only the versions of deployment descriptors supported by the platform specification: n & n-1. In the case of EE 11, this would mean that we would only need a compat10_11 test. This test would need to have the application updated to use an EJB 3+ business interface.

assembly.altDD.Client#testEJB -- assembly.classpath.ejb -- assembly.standalone.jar -- connector.deployment -- connector.localTx.transaction. -- connector.xa.transaction.jta -- integration.sec.propagation -- integration.session. -- jta.ee.txpropagationtest -- samples.ejb -- These tests would need to have the application updated to use an EJB 3+ business interface.

Everything that uses the ejb vehicle also needs to be updated to use an EJB 3+ business interface. This involves updating the vehicle's interfaces, as well as the deployment descriptors for each of the impacted tests. These include: connector javamail jaxws jdbc jta jms samples webservices12 xa

brideck commented 3 months ago

I've attached PRs that take care of most of the impacted tests. There are somewhere around 10-15 applications that still need updating in connector, integration, jacc, jta, samples, webservices12, and xa.

There are possibly also impacts in this space in the legacy tests that were moved as-is to separate TCKs in EE 10, like Faces, Authentication, and Security. I have not taken a look at those at all.

brideck commented 2 months ago

@scottmarlow Working on the remaining tests and I'm not entirely sure what to do with these tests: ejb30/bb/session/stateful/sessioncontext ejb30/bb/session/stateless/sessioncontext

For the most part, they are straightforward EJB 3.x tests, but there are a handful of scenarios in each in which they try to invoke 3.x-specific things through 2.x interfaces (homes/CIs) to make sure that they throw exceptions. All of the 2.x scenarios are negative tests and only make sense with the older APIs, so these cannot be migrated to 3.x.

Options would be:

The last choice seems perhaps the most correct, but also seems like a lot more work.

I'm going to skip them for now as I work on my 3rd PR and tackle all of the more obvious cases.

scottmarlow commented 1 month ago

Options would be:

Mark these tests as ejb2x_optional, javaee_optional in keyword.properties Disable the negative 2.x tests and remove the 2.x interfaces, etc. Factor the 2.x tests out into their own package and mark them as optional

Disable the negative 2.x tests and remove the 2.x interfaces, etc.

^ sounds the closest to removing the tests. Any reason why that isn't an option?

brideck commented 1 month ago

Disable the negative 2.x tests and remove the 2.x interfaces, etc.

^ sounds the closest to removing the tests. Any reason why that isn't an option?

We're not looking to remove tests that are actually testing EJB 2.x, are we? e.g. everything under ejb (not ejb30). If that stuff isn't staying as an optional set of tests in EE 11, then sure, I can just remove these here.

I'm having trouble keeping straight what specific function needs to stay in what place these days.

scottmarlow commented 1 month ago

Disable the negative 2.x tests and remove the 2.x interfaces, etc.

^ sounds the closest to removing the tests. Any reason why that isn't an option?

We're not looking to remove tests that are actually testing EJB 2.x, are we? e.g. everything under ejb (not ejb30). If that stuff isn't staying as an optional set of tests in EE 11, then sure, I can just remove these here.

I'm having trouble keeping straight what specific function needs to stay in what place these days.

I'm going by what the https://jakarta.ee/specifications/platform/11 lists as being removed from Jakarta EE 11:

Removals, deprecations or backwards incompatible changes Remove all optional specifications

^ means to me that the EE 11 Platform TCK doesn't need to test any optional technologies as they are being removed.

I do note that https://jakarta.ee/specifications/webprofile/11/ doesn't mention optional specifications but perhaps that is because the Web Profile is a subset of the Platform.

brideck commented 1 month ago

I'm going by what the https://jakarta.ee/specifications/platform/11 lists as being removed from Jakarta EE 11:

Removals, deprecations or backwards incompatible changes Remove all optional specifications

^ means to me that the EE 11 Platform TCK doesn't need to test any optional technologies as they are being removed.

I do note that https://jakarta.ee/specifications/webprofile/11/ doesn't mention optional specifications but perhaps that is because the Web Profile is a subset of the Platform.

Okay, I'll go ahead and try to rip that part out then. Making good progress -- just have this set we're talking about here and a pile of tests in the xa bucket left to go.