Skip to content

Commit

Permalink
Fix jpa tests that were missing client setup calls
Browse files Browse the repository at this point in the history
Signed-off-by: Scott M Stark <[email protected]>
  • Loading branch information
starksm64 committed Dec 13, 2024
1 parent 7dc120c commit 94a984d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class PersistenceProvider
protected TSLogger logger;

public PersistenceProvider() {
// logger = TSLogger.getInstance();
callLogger("PersistenceProvider.ctor");
}

private void callLogger(String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(warResURL != null) {
jpa_core_annotations_version_pmservlet_vehicle_web.addAsWebInfResource(warResURL, "web.xml");
}
// The sun-web.xml descriptor
warResURL = Client1.class.getResource("//com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.war.sun-web.xml");
if(warResURL != null) {
jpa_core_annotations_version_pmservlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml");
}

// Any libraries added to the war

Expand All @@ -103,10 +98,6 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
if(warResURL != null) {
jpa_core_annotations_version_pmservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/lib/jpa_core_annotations_version.jar");
}
warResURL = Client1.class.getResource("/com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.xml");
if(warResURL != null) {
jpa_core_annotations_version_pmservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/pmservlet_vehicle_web.xml");
}

// Call the archive processor
archiveProcessor.processWebArchive(jpa_core_annotations_version_pmservlet_vehicle_web, Client1.class, warResURL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,14 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
}
// Call the archive processor
archiveProcessor.processParArchive(jpa_ee_pluggability_contracts_jta, Client.class, parURL);
// The orm.xml file
// The orm.xml and mapping files
parURL = Client.class.getResource("orm.xml");
if(parURL != null) {
jpa_ee_pluggability_contracts_jta.addAsManifestResource(parURL, "orm.xml");
}
jpa_ee_pluggability_contracts_jta.addAsManifestResource(parURL, "orm.xml");
parURL = Client.class.getResource("myMappingFile1.xml");
jpa_ee_pluggability_contracts_jta.addAsManifestResource(parURL, "myMappingFile1.xml");
parURL = Client.class.getResource("myMappingFile2.xml");
jpa_ee_pluggability_contracts_jta.addAsManifestResource(parURL, "myMappingFile2.xml");

JavaArchive jpa_alternate_provider = ShrinkWrap.create(JavaArchive.class,"jpa_alternate_provider.jar");
jpa_alternate_provider.addClasses(
ee.jakarta.tck.persistence.common.pluggability.altprovider.implementation.CacheImpl.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Client2() {
}


public void setupData(String[] args, Properties p) throws Exception {
public void setup(String[] args, Properties p) throws Exception {
logTrace( "setupData");
try {
super.setup(args,p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void main(String[] args) {
s.exit();
}

public void setupShortData(String[] args, Properties p) throws Exception {
public void setup(String[] args, Properties p) throws Exception {
logTrace( "setupShortData");
try {
super.setup(args,p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void main(String[] args) {
s.exit();
}

public void setupLongData(String[] args, Properties p) throws Exception {
public void setup(String[] args, Properties p) throws Exception {
logTrace( "setupLongData");
try {
super.setup(args,p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public static void main(String[] args) {
s.exit();
}


public void setupTimestampData(String[] args, Properties p) throws Exception {
public void setup(String[] args, Properties p) throws Exception {
logTrace( "setupTimestampData");
try {
super.setup(args,p);
Expand Down

0 comments on commit 94a984d

Please sign in to comment.