diff --git a/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java b/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java index 083a2d4891..44662e523b 100644 --- a/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java +++ b/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java @@ -86,8 +86,9 @@ public Properties getVehicleSpecificClientProps(Properties p) { */ public Status run(String[] argv, Properties p) { Status status = null; - if (TestUtil.iWhereAreWe == TestUtil.VM_HARNESS - && this instanceof com.sun.ts.tests.common.vehicle.VehicleClient) { + boolean inTestHarness = TestUtil.iWhereAreWe == TestUtil.VM_HARNESS; + boolean isVehicleClient = this instanceof com.sun.ts.tests.common.vehicle.VehicleClient; + if (inTestHarness && isVehicleClient) { TestUtil.logTrace("in ServiceEETest.run() method"); String sVehicle = TestUtil.getProperty(p, "vehicle"); String className = this.getClass().getName(); diff --git a/connector/pom.xml b/connector/pom.xml index 1ed660a5c4..7efaf9140d 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -45,6 +45,32 @@ jakarta.resource jakarta.resource-api + + + org.junit.jupiter + junit-jupiter + + + org.jboss.arquillian.junit5 + arquillian-junit5-container + + + org.jboss.shrinkwrap + shrinkwrap-api + + + org.jboss.arquillian.container + arquillian-container-test-api + + + jakarta.tck.arquillian + arquillian-protocol-common + ${arquillian.jakarta.tck.version} + + + jakarta.tck.arquillian + tck-porting-lib + diff --git a/connector/rewrite-pom.xml b/connector/rewrite-pom.xml new file mode 100644 index 0000000000..a6cde3ca72 --- /dev/null +++ b/connector/rewrite-pom.xml @@ -0,0 +1,303 @@ + + + + 4.0.0 + + + org.eclipse.ee4j + project + 1.0.7 + + + jakarta.tck + connector-rewrite + 11.0.0-SNAPSHOT + pom + project + project + + + 1.10.11 + 1.8.0.Final + + + 4.0.0 + + 2.0.0 + + 3.2.0-M2 + 2.0.0 + + 2.1.1 + 2.0.0 + 2.1.0 + + 2.0.0 + + 4.0.0 + 6.0.0-M1 + 3.0.0 + 2.0.1 + + 2.1.0 + 3.0.0 + 2.0.0 + + 2.0.0 + + 2.0.0 + 6.0.0 + + 2.0.0 + 3.0.0 + + 3.1.0 + 3.0.0 + 3.0.0 + 4.0.0 + 5.0 + 3.0.0 + + 3.1.0 + 3.0.0 + + 2.1.1 + + 3.1.0 + + 2.0.0 + 17 + ${maven.compiler.release} + UTF-8 + UTF-8 + 2.0.0 + false + 8.24.0 + 1.9.1.Final + 3.0.0 + 3.0.0 + 3.0.0 + 3.0.0 + + 2.2.0 + 2.2.0 + + + + + + + ${project.groupId} + libutil + ${project.version} + + + ${project.groupId} + common + ${project.version} + + + jakarta.ejb + jakarta.ejb-api + 4.0.1 + + + jakarta.resource + jakarta.resource-api + 2.0.0 + + + + + + + + false + + + true + + oss.sonatype.org + Jetty Snapshot Repository + https://oss.sonatype.org/content/repositories/jetty-snapshots/ + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.2.0 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.0.0 + + + com.sun.xml.ws + jaxws-maven-plugin + 4.0.0 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + forked-path + clean install + -Drelease -Dtck-audit + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + none + + + + org.codehaus.mojo + exec-maven-plugin + 3.2.0 + + + ${java.home} + ${java.home} + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-install-plugin + 3.0.0-M1 + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + org.apache.maven.plugins + maven-resources-plugin + 3.2.0 + + + + + + + + org.openrewrite.maven + rewrite-maven-plugin + 5.32.1 + + + tck.jakarta.platform.rewrite.GenerateNewTestClassRecipe + + + + + jakarta.tck + tck-rewrite-tools + 1.0.0-SNAPSHOT + + + org.openrewrite + rewrite-core + 8.24.0 + + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.2 + + + org.openrewrite.recipe + rewrite-testing-frameworks + 2.6.0 + + + org.openrewrite.recipe + rewrite-github-actions + 2.1.7 + + + org.openrewrite + rewrite-java-17 + ${version.openrewrite} + + + org.openrewrite + rewrite-test + ${version.openrewrite} + + + org.openrewrite + rewrite-java-test + ${version.openrewrite} + + + + + + + + diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java new file mode 100644 index 0000000000..580e0cf5f2 --- /dev/null +++ b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java @@ -0,0 +1,58 @@ +package com.sun.ts.tests.common.connector.embedded.adapter1; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.StringAsset; +import org.jboss.shrinkwrap.api.exporter.ZipExporter; +import org.jboss.shrinkwrap.api.spec.JavaArchive; + +public class RADeployment { + public static JavaArchive create_whitebox_rd_rar() { + JavaArchive resouredef_jar = ShrinkWrap.create(JavaArchive.class, "resouredef.jar") + .addClasses( + com.sun.ts.tests.common.connector.embedded.adapter1.CRDActivationSpec.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDAdminObject.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDManagedConnectionFactory.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDMessageListener.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDMessageWork.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDResourceAdapterImpl.class, + com.sun.ts.tests.common.connector.embedded.adapter1.CRDWorkManager.class, + com.sun.ts.tests.common.connector.embedded.adapter1.MsgXAResource.class, + com.sun.ts.tests.common.connector.embedded.adapter1.NestedWorkXid1.ContextType.class, + com.sun.ts.tests.common.connector.embedded.adapter1.NestedWorkXid1.class, + com.sun.ts.tests.common.connector.util.ConnectorStatus.class, + com.sun.ts.tests.common.connector.util.Log.class, + com.sun.ts.tests.common.connector.whitebox.WorkImpl.class, + com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl.class, + com.sun.ts.tests.common.connector.whitebox.XidImpl.class, + com.sun.ts.tests.common.connector.whitebox.NestedWorkXid.class, + com.sun.ts.tests.common.connector.whitebox.TSDataSource.class, + com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, + com.sun.ts.tests.common.connector.whitebox.Debug.class + ); + + + JavaArchive whitebox_rd_rar = ShrinkWrap.create(JavaArchive.class, "whitebox-rd.rar"); + whitebox_rd_rar.add(resouredef_jar, "resouredef.jar", ZipExporter.class); + String mf = """ + Manifest-Version: 1.0 + Ant-Version: Apache Ant 1.10.14 + Created-By: 17.0.12+7 (Red Hat, Inc.) + Extension-List: tsharness cts whitebox + tsharness-Extension-Name: tsharness + tsharness-Specification-Version: 1.4 + tsharness-Implementation-Version: 1.4 + tsharness-Implementation-Vendor-Id: com.sun + cts-Extension-Name: cts + cts-Specification-Version: 1.4 + cts-Implementation-Version: 1.4 + cts-Implementation-Vendor-Id: com.sun + whitebox-Extension-Name: whitebox + whitebox-Specification-Version: 1.6 + whitebox-Implementation-Version: 1.6 + whitebox-Implementation-Vendor-Id: com.sun + + """; + whitebox_rd_rar.setManifest(new StringAsset(mf)); + return whitebox_rd_rar; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml similarity index 92% rename from common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml rename to connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml index 7a4ad8e3db..e458fbde75 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml +++ b/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml @@ -17,7 +17,7 @@ --> - + @@ -50,7 +50,7 @@ - +