Skip to content

Commit

Permalink
Merge pull request #4 from alwin-joseph/jpa_appclient_test
Browse files Browse the repository at this point in the history
Update jpa appclient test runner
  • Loading branch information
scottmarlow authored Oct 6, 2024
2 parents 31983ec + 0dd4a96 commit 620a7ce
Show file tree
Hide file tree
Showing 8 changed files with 2,700 additions and 22 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2,463 changes: 2,463 additions & 0 deletions glassfish-runner/jpa-platform-tck/jakartaeetck/bin/ts.jte

Large diffs are not rendered by default.

193 changes: 179 additions & 14 deletions glassfish-runner/jpa-platform-tck/pom.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,57 @@
</engine>

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

<group qualifier="glassfish-servers" default="true">
<container qualifier="tck-appclient" default="true">
<configuration>
<property name="glassFishHome">target/glassfish8</property>
</configuration>
<protocol type="appclient">
<protocol type="appclient" default="true">
<property name="runClient">true</property>
<property name="runAsVehicle">true</property>
<property name="clientEarDir">target/appclient</property>
<property name="unpackClientEar">true</property>
<!-- Need to populate from ts.jte command.testExecuteAppClient setting for glassfish -->
<!-- <property name="clientCmdLineString">${javaee.home}/bin/appclient.sh;-y;target/test-classes/appclient.yml;-y;target/test-classes/derby.yml;${clientEarDir}/${vehicleArchiveName}.ear#${vehicleArchiveName}_client.jar</property> -->
<property name="clientCmdLineString">${glassfish.home}/glassfish/bin/appclient \
-Djdk.tls.client.enableSessionTicketExtension=false \
-Djdk.tls.server.enableSessionTicketExtension=false \
-Djava.security.policy=${glassfish.home}/glassfish/lib/appclient/client.policy \
-Dcts.tmp=${ts.home}/tmp \
-Djava.security.auth.login.config=${glassfish.home}/glassfish/lib/appclient/appclientlogin.conf \
-Djava.protocol.handler.pkgs=javax.net.ssl \
-Djavax.net.ssl.keyStore=${ts.home}/bin/certificates/clientcert.jks \
-Djavax.net.ssl.keyStorePassword=changeit \
-Djavax.net.ssl.trustStore=${glassfish.home}/glassfish/domains/domain1/config/cacerts.jks \
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl \
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl \
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl \
-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser \
-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter \
-Doracle.jdbc.J2EE13Compliant=true \
-Doracle.jdbc.mapDateToTimestamp \
-Dstartup.login=false \
-Dauth.gui=false \
-Dlog.file.location=${glassfish.home}/glassfish/domains/domain1/logs \
-Dri.log.file.location=${glassfish.home}/glassfish/domains/domain1/logs \
-DwebServerHost.2=localhost \
-DwebServerPort.2=8080 \
-Ddeliverable.class=com.sun.ts.lib.deliverable.cts.CTSDeliverable \
-jar \
${clientEarDir}/${clientAppArchive}
</property>
<property name="cmdLineArgSeparator">\\</property>
<!-- Pass ENV vars here -->
<property name="clientEnvString">CLASSPATH=${project.build.directory}/appclient/javatest.jar:${project.build.directory}/appclient/libutil.jar:${project.build.directory}/appclient/libcommon.jar</property>
<!-- <property name="clientEnvString">PATH=${env.PATH};LD_LIBRARY_PATH=${glassfish.home}/lib;AS_DEBUG=true;
APPCPATH=${glassfish.home}/glassfish/lib/arquillian-protocol-lib.jar:${glassfish.home}/glassfish/lib/tck-porting-lib.jar:target/appclient/lib/arquillian-core.jar:target/appclient/lib/arquillian-junit5.jar:${glassfish.home}/glassfish/modules/security.jar</property> -->
<property name="clientEnvString">PATH=${env.PATH};LD_LIBRARY_PATH=${glassfish.home}/lib;AS_DEBUG=true;
APPCPATH=target/lib/arquillian-protocol-lib.jar:target/lib/tck-porting-lib.jar</property>
<property name="clientDir">${project.basedir}</property>
<property name="workDir">${ts.home}/tmp</property>
<property name="tsJteFile">${ts.home}/bin/ts.jte</property>
<property name="workDir">/tmp</property>
<property name="tsJteFile">jakartaeetck/bin/ts.jte</property>
<property name="tsSqlStmtFile">sql/derby/derby.dml.sql</property>
<property name="trace">true</property>
<property name="clientTimeout">20000</property>
</protocol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<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 @@ -18,7 +18,7 @@
<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>
</protocol>
</container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package ee.jakarta.tck.persistence.core.EntityGraph;

import com.sun.ts.lib.harness.Status;
import java.util.Properties;
import ee.jakarta.tck.persistence.core.EntityGraph.Client;
import java.net.URL;
import org.jboss.arquillian.container.test.api.Deployment;
Expand Down Expand Up @@ -33,6 +35,17 @@
public class ClientAppmanagednotxTest extends ee.jakarta.tck.persistence.core.EntityGraph.Client {
static final String VEHICLE_ARCHIVE = "jpa_core_EntityGraph_appmanagedNoTx_vehicle";

public static void main(String[] args) {
ClientAppmanagednotxTest theTests = new ClientAppmanagednotxTest();
Status s = theTests.run(args, System.out, System.err);
s.exit();
}

public void setup(String[] args, Properties p) throws Fault {
super.setup(args, p);
}


/**
EE10 Deployment Descriptors:
jpa_core_EntityGraph: META-INF/persistence.xml
Expand Down Expand Up @@ -82,6 +95,9 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.ejb3share.EntityTransactionWrapper.class,
com.sun.ts.lib.harness.EETest.SetupException.class,
com.sun.ts.tests.common.vehicle.VehicleClient.class,
ee.jakarta.tck.persistence.core.EntityGraph.Client.class,
ee.jakarta.tck.persistence.core.EntityGraph.Employee3.class,
ee.jakarta.tck.persistence.core.EntityGraph.Department.class,
com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper.class
);
// The application-client.xml descriptor
Expand Down Expand Up @@ -112,6 +128,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManagerFactory.class,
ee.jakarta.tck.persistence.common.PMClientBase.class,
ee.jakarta.tck.persistence.core.EntityGraph.Client.class,
ee.jakarta.tck.persistence.core.EntityGraph.Employee3.class,
ee.jakarta.tck.persistence.core.EntityGraph.Department.class,
com.sun.ts.tests.common.vehicle.VehicleRunnable.class,
com.sun.ts.tests.common.vehicle.ejb3share.UserTransactionWrapper.class,
com.sun.ts.lib.harness.EETest.class,
Expand Down

0 comments on commit 620a7ce

Please sign in to comment.