Skip to content

Commit

Permalink
Merge pull request #1559 from alwin-joseph/jta_javatest
Browse files Browse the repository at this point in the history
Jakarta Transactions TCK : Updates to Javatests, fix failures
  • Loading branch information
alwin-joseph authored Oct 4, 2024
2 parents c791123 + 244981a commit ddf58ec
Show file tree
Hide file tree
Showing 23 changed files with 2,514 additions and 564 deletions.
2,463 changes: 2,463 additions & 0 deletions glassfish-runner/jta-platform-tck/jakartaeetck/bin/ts.jte

Large diffs are not rendered by default.

21 changes: 18 additions & 3 deletions glassfish-runner/jta-platform-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
<sql.directory>./sql</sql.directory>
<tck.artifactId>jta-tck</tck.artifactId>
<tck.version>11.0.0-SNAPSHOT</tck.version>
<ts.home>/jakartaeetck</ts.home>
<ts.home>./jakartaeetck/</ts.home>
<user1>cts1</user1>
<user2>cts1</user2>
<version.jakarta.tck>11.0.0-SNAPSHOT</version.jakarta.tck>
<version.jakarta.tck.arquillian>1.0.0-M15</version.jakarta.tck.arquillian>
<version.jakarta.tck.arquillian>1.0.0-M16</version.jakarta.tck.arquillian>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -192,7 +192,7 @@
<dependency>
<groupId>jakarta.tck.arquillian</groupId>
<artifactId>arquillian-protocol-javatest</artifactId>
<version>${version.jakarta.tck.arquillian}</version>
<version>1.0.0-M15</version>
<exclusions>
<exclusion>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
Expand Down Expand Up @@ -324,6 +324,21 @@
</arguments>
</configuration>
</execution>
<execution>
<id>006-StopDatabase</id>
<goals>
<goal>exec</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<workingDirectory>${derby.basedir}</workingDirectory>
<arguments>
<argument>stop-database</argument>
</arguments>
</configuration>
</execution>

</executions>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<engine>
<property name="deploymentExportPath">target/</property>
<property name="deploymentExportPath">target/deployments</property>
</engine>

<extension qualifier="glassfish-descriptors">
<property name="descriptorDir">${ts.home}/dist/</property>
<property name="descriptorDir">target/</property>
</extension>

<group qualifier="glassfish-servers" default="true">
Expand All @@ -19,8 +19,14 @@
<protocol type="javatest">
<property name="trace">true</property>
<property name="workDir">/tmp</property>
<property name="tsJteFile">${ts.home}/bin/ts.jte</property>
<property name="tsJteFile">jakartaeetck/bin/ts.jte</property>
<property name="tsSqlStmtFile">sql/derby/derby.dml.sql</property>
<property name="runClient">true</property>
<property name="runAsVehicle">true</property>
<property name="clientEarDir">target/appclient</property>
<property name="unpackClientEar">true</property>
<property name="clientDir">${project.basedir}</property>
<property name="clientTimeout">20000</property>
</protocol>
</container>
</group>
Expand Down
7 changes: 4 additions & 3 deletions jta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<artifactId>jta-tck</artifactId>
<packaging>jar</packaging>

<name>jta</name>
<description>jta</description>
<name>Jakarta Transactions</name>
<description>Jakarta Transactions</description>

<properties>
<arquillian.junit>1.9.1.Final</arquillian.junit>
Expand All @@ -57,8 +57,9 @@
<artifactId>libutil</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>jakarta.tck</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,13 @@ public static void main(String[] args) {
@TwoManagedQualifier
TwoManagedBean two;

/**
EE10 Deployment Descriptors:
transactional_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml

Found Descriptors:
War:
/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml
*/
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static WebArchive createDeploymentVehicle() {
// public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {

// War
// the war with the correct archive name
WebArchive transactional_ejblitejsf_vehicle_web = ShrinkWrap.create(WebArchive.class, "transactional_ejblitejsf_vehicle_web.war");
// The class files
transactional_ejblitejsf_vehicle_web.addClasses(
Expand Down Expand Up @@ -141,7 +131,6 @@ public static WebArchive createDeploymentVehicle() {
if(warResURL != null) {
transactional_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "web.xml");
}
// The sun-web.xml descriptor
warResURL = ClientEjblitejsfTest.class.getResource("/vehicle/ejblitejsf/faces-config.xml");
if(warResURL != null) {
transactional_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "faces-config.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ public void cleanup() {
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static WebArchive createDeploymentVehicle() {
// War
// the war with the correct archive name
WebArchive transactional_ejblitejsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "transactional_ejblitejsp_vehicle_web.war");
// The class files
transactional_ejblitejsp_vehicle_web.addClasses(
com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class,
com.sun.ts.tests.common.vehicle.VehicleRunnable.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// The class files
jta_ee_txpropagate1_ejb.addClasses(
com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanHome.class
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class
);
// The ejb-jar.xml descriptor
ejbResURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ee_txpropagate1_ejb.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,39 +52,12 @@ public void cleanup() {
logger.log(Logger.Level.INFO, "cleanup ok");
}

/**
EE10 Deployment Descriptors:
jta_ee_txpropagate1_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ee_txpropagate2_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ee_txpropagate3_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ejb_vehicle:
jta_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml
jta_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_jsp_vehicle:
jta_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml
jta_servlet_vehicle:
jta_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml
Found Descriptors:
Ejb:
/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml
/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml
War:
/com/sun/ts/tests/jta/ee/txpropagationtest/jsp_vehicle_web.xml
/com/sun/ts/tests/common/vehicle/jsp/jsp_vehicle_web.xml
Ear:
*/
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name

WebArchive jta_jsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "jta_jsp_vehicle_web.war");
// The class files
jta_jsp_vehicle_web.addClasses(
com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class,
com.sun.ts.lib.harness.EETest.Fault.class,
Expand All @@ -93,7 +66,6 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.VehicleRunnable.class,
com.sun.ts.tests.jta.ee.txpropagationtest.Client.class,
com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanHome.class,
com.sun.ts.lib.harness.EETest.class,
com.sun.ts.lib.harness.ServiceEETest.class,
com.sun.ts.lib.harness.EETest.SetupException.class,
Expand All @@ -106,29 +78,25 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(warResURL != null) {
jta_jsp_vehicle_web.addAsWebInfResource(warResURL, "web.xml");
}

// Web content
warResURL = ClientJspTest.class.getResource("/vehicle/jsp/contentRoot/client.html");
jta_jsp_vehicle_web.addAsWebResource(warResURL, "/client.html");
warResURL = ClientJspTest.class.getResource("/vehicle/jsp/contentRoot/jsp_vehicle.jsp");
jta_jsp_vehicle_web.addAsWebResource(warResURL, "/jsp_vehicle.jsp");

// The sun-web.xml descriptor
warResURL = ClientJspTest.class.getClassLoader().getResource(packagePath+"/jta_jsp_vehicle_web.war.sun-web.xml");
if(warResURL != null) {
jta_jsp_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml");
}

// archiveProcessor.processWebArchive(jta_jsp_vehicle_web, ClientJspTest.class, warResURL);
archiveProcessor.processWebArchive(jta_jsp_vehicle_web, ClientJspTest.class, warResURL);


// Ejb
// the jar with the correct archive name
JavaArchive jta_ee_txpropagate3_ejb = ShrinkWrap.create(JavaArchive.class, "jta_ee_txpropagate3_ejb.jar");
// The class files
jta_ee_txpropagate3_ejb.addClasses(
com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanHome.class,
com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class
);
// The ejb-jar.xml descriptor
Expand All @@ -141,32 +109,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(ejbResURL != null) {
jta_ee_txpropagate3_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml");
}
// archiveProcessor.processEjbArchive(jta_ee_txpropagate3_ejb, ClientJspTest.class, ejbResURL);
archiveProcessor.processEjbArchive(jta_ee_txpropagate3_ejb, ClientJspTest.class, ejbResURL);

// Ear
EnterpriseArchive jta_jsp_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "jta_jsp_vehicle.ear");

// Any libraries added to the ear

// The component jars built by the package target
// jta_jsp_vehicle_ear.addAsModule(jta_ee_txpropagate1_ejb);
// jta_jsp_vehicle_ear.addAsModule(jta_ee_txpropagate2_ejb);
jta_jsp_vehicle_ear.addAsModule(jta_ee_txpropagate3_ejb);
jta_jsp_vehicle_ear.addAsModule(jta_jsp_vehicle_web);



// // The application.xml descriptor
// URL earResURL = Client.class.getResource("/com/sun/ts/tests/jta/ee/txpropagationtest/");
// if(earResURL != null) {
// jta_jsp_vehicle_ear.addAsManifestResource(earResURL, "application.xml");
// }
// // The sun-application.xml descriptor
// earResURL = Client.class.getResource("/com/sun/ts/tests/jta/ee/txpropagationtest/.ear.sun-application.xml");
// if(earResURL != null) {
// jta_jsp_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml");
// }
// archiveProcessor.processEarArchive(jta_jsp_vehicle_ear, Client.class, earResURL);
return jta_jsp_vehicle_ear;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,39 +52,12 @@ public void cleanup() {
logger.log(Logger.Level.INFO, "cleanup ok");
}

/**
EE10 Deployment Descriptors:
jta_ee_txpropagate1_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ee_txpropagate2_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ee_txpropagate3_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_ejb_vehicle:
jta_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml
jta_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml
jta_jsp_vehicle:
jta_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml
jta_servlet_vehicle:
jta_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml
Found Descriptors:
Ejb:
/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml
/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml
War:
/com/sun/ts/tests/jta/ee/txpropagationtest/servlet_vehicle_web.xml
/com/sun/ts/tests/common/vehicle/servlet/servlet_vehicle_web.xml
Ear:
*/
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name

WebArchive jta_servlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jta_servlet_vehicle_web.war");
// The class files
jta_servlet_vehicle_web.addClasses(
com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class,
com.sun.ts.lib.harness.EETest.Fault.class,
Expand All @@ -94,7 +67,6 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.VehicleRunnable.class,
com.sun.ts.tests.jta.ee.txpropagationtest.Client.class,
com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanHome.class,
com.sun.ts.lib.harness.EETest.class,
com.sun.ts.lib.harness.ServiceEETest.class,
com.sun.ts.lib.harness.EETest.SetupException.class,
Expand All @@ -112,17 +84,13 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(warResURL != null) {
jta_servlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml");
}
// Web content
// archiveProcessor.processWebArchive(jta_servlet_vehicle_web, ClientServletTest.class, warResURL);
archiveProcessor.processWebArchive(jta_servlet_vehicle_web, ClientServletTest.class, warResURL);


// Ejb
// the jar with the correct archive name
JavaArchive jta_ee_txpropagate2_ejb = ShrinkWrap.create(JavaArchive.class, "jta_ee_txpropagate2_ejb.jar");
// The class files
jta_ee_txpropagate2_ejb.addClasses(
com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class,
com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanHome.class,
com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class
);
// The ejb-jar.xml descriptor
Expand All @@ -135,31 +103,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(ejbResURL != null) {
jta_ee_txpropagate2_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml");
}
// archiveProcessor.processEjbArchive(jta_ee_txpropagate2_ejb, ClientServletTest.class, ejbResURL);
archiveProcessor.processEjbArchive(jta_ee_txpropagate2_ejb, ClientServletTest.class, ejbResURL);

// Ear
EnterpriseArchive jta_servlet_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "jta_servlet_vehicle.ear");

// Any libraries added to the ear

// The component jars built by the package target
// jta_servlet_vehicle_ear.addAsModule(jta_ee_txpropagate1_ejb);
jta_servlet_vehicle_ear.addAsModule(jta_ee_txpropagate2_ejb);
// jta_servlet_vehicle_ear.addAsModule(jta_ee_txpropagate3_ejb);
jta_servlet_vehicle_ear.addAsModule(jta_servlet_vehicle_web);


// // The application.xml descriptor
// URL earResURL = Client.class.getResource("/com/sun/ts/tests/jta/ee/txpropagationtest/");
// if(earResURL != null) {
// jta_servlet_vehicle_ear.addAsManifestResource(earResURL, "application.xml");
// }
// // The sun-application.xml descriptor
// earResURL = Client.class.getResource("/com/sun/ts/tests/jta/ee/txpropagationtest/.ear.sun-application.xml");
// if(earResURL != null) {
// jta_servlet_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml");
// }
// archiveProcessor.processEarArchive(jta_servlet_vehicle_ear, Client.class, earResURL);
return jta_servlet_vehicle_ear;
}

Expand Down

This file was deleted.

Loading

0 comments on commit ddf58ec

Please sign in to comment.