jakartaee / platform-tck

Jakartaee-tck
Other
131 stars 112 forks source link

Issues with the downloaded Jakarta EE 11 Platform TCK ZIP #1803

Open jamezp opened 3 weeks ago

jamezp commented 3 weeks ago

I'm creating this as a general issue for what I'm seeing when downloading the platform-tck-11.0.0-SNAPSHOT-dist.zip.

The first issue I've seen is with the artifacts content. After the archive is unzipped you end up with a platform-tck-11.0.0-SNAPSHOT/artifacts directory which contains the TCK JAR's and what looks like some other utility JAR's.

``` appclient-11.0.0-SNAPSHOT.jar assembly-tck-11.0.0-SNAPSHOT.jar common-11.0.0-SNAPSHOT.jar connector-11.0.0-SNAPSHOT.jar ejb30-11.0.0-SNAPSHOT.jar ejb32-11.0.0-SNAPSHOT.jar el-platform-tck-11.0.0-SNAPSHOT.jar integration-11.0.0-SNAPSHOT.jar javaee-tck-11.0.0-SNAPSHOT.jar javamail-11.0.0-SNAPSHOT.jar jdbc-11.0.0-SNAPSHOT.jar jms-tck-11.0.0-SNAPSHOT.jar jsonb-platform-tck-11.0.0-SNAPSHOT.jar libutil-11.0.0-SNAPSHOT.jar pages-platform-tck-11.0.0-SNAPSHOT.jar persistence-platform-tck-tests-11.0.0-SNAPSHOT.jar pom.xml rest-platform-tck-11.0.0-SNAPSHOT.jar runtime-11.0.0-SNAPSHOT.jar signaturetest-11.0.0-SNAPSHOT.jar transactions-tck-11.0.0-SNAPSHOT.jar tsharness-11.0.0-SNAPSHOT.jar websocket-tck-platform-tests-2.2.0.jar xa-11.0.0-SNAPSHOT.jar ```

This directory also includes a pom.xml which can seemingly be used to install the artifacts into local Maven repository. The contents of the pom.xml looks like:

```xml 4.0.0 jakarta.tck cdi-tck-artifacts pom 11.0.0-SNAPSHOT Jakarta EE TCK Artifacts maven-install-plugin 3.1.3 install-appclient package install-file jakarta.tck appclient 11.0.0-SNAPSHOT jar appclient-11.0.0-SNAPSHOT.jar true install-assembly-tck package install-file jakarta.tck assembly-tck 11.0.0-SNAPSHOT jar assembly-tck-11.0.0-SNAPSHOT.jar true install-common package install-file jakarta.tck common 11.0.0-SNAPSHOT jar common-11.0.0-SNAPSHOT.jar true install-connector package install-file jakarta.tck connector 11.0.0-SNAPSHOT jar connector-11.0.0-SNAPSHOT.jar true install-ejb30 package install-file jakarta.tck ejb30 11.0.0-SNAPSHOT jar ejb30-11.0.0-SNAPSHOT.jar true install-ejb32 package install-file jakarta.tck ejb32 11.0.0-SNAPSHOT jar ejb32-11.0.0-SNAPSHOT.jar true install-el-platform-tck package install-file jakarta.tck el-platform-tck 11.0.0-SNAPSHOT jar el-platform-tck-11.0.0-SNAPSHOT.jar true install-integration package install-file jakarta.tck integration 11.0.0-SNAPSHOT jar integration-11.0.0-SNAPSHOT.jar true install-javaee-tck package install-file jakarta.tck javaee-tck 11.0.0-SNAPSHOT jar javaee-tck-11.0.0-SNAPSHOT.jar true install-rest-platform-tck package install-file jakarta.tck rest-platform-tck 11.0.0-SNAPSHOT jar rest-platform-tck-11.0.0-SNAPSHOT.jar true install-javamail package install-file jakarta.tck javamail 11.0.0-SNAPSHOT jar javamail-11.0.0-SNAPSHOT.jar true install-jdbc package install-file jakarta.tck jdbc 11.0.0-SNAPSHOT jar jdbc-11.0.0-SNAPSHOT.jar true install-jms-tck package install-file jakarta.tck jms-tck 11.0.0-SNAPSHOT jar jms-tck-11.0.0-SNAPSHOT.jar true install-persistence-platform-tck-tests package install-file jakarta.tck persistence-platform-tck-tests 11.0.0-SNAPSHOT jar persistence-platform-tck-tests-11.0.0-SNAPSHOT.jar true install-jsonb-platform-tck package install-file jakarta.tck jsonb-platform-tck 11.0.0-SNAPSHOT jar jsonb-platform-tck-11.0.0-SNAPSHOT.jar true install-pages-platform-tck package install-file jakarta.tck pages-platform-tck 11.0.0-SNAPSHOT jar pages-platform-tck-11.0.0-SNAPSHOT.jar true install-transactions-tck package install-file jakarta.tck transactions-tck 11.0.0-SNAPSHOT jar transactions-tck-11.0.0-SNAPSHOT.jar true install-libutil package install-file jakarta.tck libutil 11.0.0-SNAPSHOT jar libutil-11.0.0-SNAPSHOT.jar true install-runtime package install-file jakarta.tck runtime 11.0.0-SNAPSHOT jar runtime-11.0.0-SNAPSHOT.jar true install-signaturetest package install-file jakarta.tck signaturetest 11.0.0-SNAPSHOT jar signaturetest-11.0.0-SNAPSHOT.jar true install-tsharness package install-file jakarta.tck tsharness 11.0.0-SNAPSHOT jar tsharness-11.0.0-SNAPSHOT.jar true install-websocket-tck-platform-tests package install-file jakarta.tck websocket-tck-platform-tests 2.2.0 jar websocket-tck-platform-tests-2.2.0.jar true install-xa package install-file jakarta.tck xa 11.0.0-SNAPSHOT jar xa-11.0.0-SNAPSHOT.jar true ```

The initial problem I'm seeing is the generatePom configuration is being set to true. In some cases this is okay, but we're missing all the dependency information from the TCK. We could add the missing dependencies to working POM and maybe this is the best solution. However, it's not obvious what all needs to be added.

Just as an example when I attempt to run the rest-platform-tck I see this:

``` # Created at 2025-01-24T13:22:06.237 org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160) at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132) at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107) at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78) at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99) at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77) at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42) at org.apache.maven.surefire.junitplatform.LazyLauncher.discover(LazyLauncher.java:50) at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:52) at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:87) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:142) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'com.sun.ts.tests.jaxrs.jaxrs21.platform.providers.jsonb.JAXRSClientIT', classLoader = null] resolution failed at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113) at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:48) at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69) at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152) ... 15 more Caused by: java.lang.NoClassDefFoundError: com/sun/ts/tests/common/webclient/TestFailureException at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3578) at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3603) at java.base/java.lang.Class.getMethods(Class.java:2185) at org.junit.platform.commons.util.ReflectionUtils.getDefaultMethods(ReflectionUtils.java:1743) at org.junit.platform.commons.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:1716) at org.junit.platform.commons.util.ReflectionUtils.findMethod(ReflectionUtils.java:1558) at org.junit.platform.commons.util.ReflectionUtils.isMethodPresent(ReflectionUtils.java:1409) at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.hasTestOrTestFactoryOrTestTemplateMethods(IsTestClassWithTests.java:50) at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.test(IsTestClassWithTests.java:46) at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:67) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92) ... 20 more Caused by: java.lang.ClassNotFoundException: com.sun.ts.tests.common.webclient.TestFailureException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ... 44 more ```

If the correct jakarta.tck:rest-platform-tck POM is included and used for the install, we could avoid having to add all the dependencies.

Please feel free to close this if this was intended and that vendors need to include the expected dependencies.

starksm64 commented 3 weeks ago

The generatePom should probably not be used for any of these artifacts. I'm working on updating the basic testing included in the distribution job so these basic failures will be caught.

jamezp commented 3 weeks ago

That makes sense to me. Feel free to close this or I'll be happy to. The more I'm thinking about it, the less it seems like a bug or issue at all.

arjantijms commented 3 weeks ago

what looks like some other utility JAR's.

Let's please not include those utility JARs. That's IMHO backwards. Only the actual tests should be included. Utility and tools jars can simply be fetched from Maven Central.

(actually, see the requirements for the core profile to (also?) release all the jars to Maven Central anyway)

IMHO again, the less we work with the archaic jars in zip archive, the better.

starksm64 commented 3 weeks ago

Then the jars should not be a part of the platform-tck so there is no confusion as to what constitutes the platform-tck release.

On Sun, Jan 26, 2025 at 10:31 AM Arjan Tijms @.***> wrote:

what looks like some other utility JAR's.

Let's please not include those utility JARs. That's IMHO backwards. Only the actual tests should be included. Utility and tools jars can simply be fetched from Maven Central.

(actually, see the requirements for the core profile to (also?) release all the jars to Maven Central anyway)

IMHO again, the less we work with the archaic jars in zip archive, the better.

— Reply to this email directly, view it on GitHub https://github.com/jakartaee/platform-tck/issues/1803#issuecomment-2614494735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRDMR3PHZOACUFNYOJ3OL2MUEUFAVCNFSM6AAAAABV2RQZL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGQ4TINZTGU . You are receiving this because you were assigned.Message ID: @.***>

arjantijms commented 2 weeks ago

Then the jars should not be a part of the platform-tck so there is no confusion as to what constitutes the platform-tck release

They should indeed not be part of the platform TCK. We already have a repo that perfectly fits the scope, and that is https://github.com/eclipse-ee4j/jakartaee-tck-tools

jamezp commented 2 weeks ago

Should that repository be moved under the jakartaee organization? Also, we should probably make a decision soon it feels like we're on borrowed time for the TCK :)

scottmarlow commented 2 weeks ago

Should that repository be moved under the jakartaee organization? Also, we should probably make a decision soon it feels like we're on borrowed time for the TCK :)

+1

It could be moved the newer jakartaee organization. We should review the contents at some point and retire unused projects to a legacy branch so that the active contained projects have less clutter around them.