Skip to content

Commit

Permalink
Add setup method to com.sun.ts.tests.jpa.common.schema30.Util for app…
Browse files Browse the repository at this point in the history
…client tests
  • Loading branch information
scottmarlow committed Oct 10, 2024
1 parent 4aea241 commit 047a353
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,31 @@ public void removeTestData() {
}
}

public void setup(String[] args, Properties p) throws Fault {
logTrace("PMClientBase.setup");
myProps = p;

persistenceUnitName = p.getProperty(PERSISTENCE_UNIT_NAME_PROP);
logTrace("Persistence Unit Name =" + persistenceUnitName);
secondPersistenceUnitName = p
.getProperty(SECOND_PERSISTENCE_UNIT_NAME_PROP);
logTrace("Second Persistence Unit Name =" + secondPersistenceUnitName);
if (JAKARTA_EE.equalsIgnoreCase(p.getProperty(MODE_PROP))) {
logTrace(MODE_PROP + " is set to " + p.getProperty(MODE_PROP)
+ ", so tests are running in JakartaEE environment.");
} else if (STANDALONE_MODE.equalsIgnoreCase(p.getProperty(MODE_PROP))) {
logTrace(MODE_PROP + " is set to " + p.getProperty(MODE_PROP)
+ ", so tests are running in J2SE environment standalone mode."
+ PERSISTENCE_UNIT_NAME_PROP + " is set to " + persistenceUnitName);
} else {
logMsg("WARNING: " + MODE_PROP + " is set to " + p.getProperty(MODE_PROP)
+ ", an invalid value.");
}

cachingSupported = Boolean.parseBoolean(
p.getProperty(PERSISTENCE_SECOND_LEVEL_CACHING_SUPPORTED, "true"));
displayProperties(p);
}

public void setupProductData(String[] args, Properties p) throws Exception {
logTrace("setupProductData");
Expand Down

0 comments on commit 047a353

Please sign in to comment.