Skip to content

Commit

Permalink
add more trace output for vehicle determination to understand what ne…
Browse files Browse the repository at this point in the history
…eds to change for appclient vehicle
  • Loading branch information
scottmarlow committed Oct 11, 2024
1 parent ae8c261 commit aae21ed
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public Properties getVehicleSpecificClientProps(Properties p) {
public Status run(String[] argv, Properties p) {
Status status = null;
boolean inTestHarness = TestUtil.iWhereAreWe == TestUtil.VM_HARNESS;
TestUtil.logTrace("Check if called from within test process, inTestHarness= " + inTestHarness);
boolean isVehicleClient = false;
URL thisURL = getClass().getProtectionDomain().getCodeSource().getLocation();
TestUtil.logTrace("in ServiceEETest.run(), this URL is: " + thisURL);
Expand All @@ -95,7 +96,17 @@ public Status run(String[] argv, Properties p) {
URL vcClassURL = vcClass.getProtectionDomain().getCodeSource().getLocation();
TestUtil.logTrace("VehicleClient URL is: " + vcClassURL);
isVehicleClient = vcClass.isAssignableFrom(getClass());
TestUtil.logTrace("VehicleClient URL is: " + vcClassURL);
TestUtil.logTrace("VehicleClient class check if is vehicle class = " +
(isVehicleClient? "yes, is a com.sun.ts.tests.common.vehicle.VehicleClient"
: "no, is not com.sun.ts.tests.common.vehicle.VehicleClient class"));
if (inTestHarness && !isVehicleClient) {
String sVehicle = TestUtil.getProperty(p, "vehicle");
if("stateless3".equals(sVehicle) || "stateful3".equals(sVehicle)
|| "appmanaged".equals(sVehicle) || "appmanagedNoTx".equals(sVehicle)) {
isVehicleClient = true;
TestUtil.logTrace("Using appclient vehicle so set is vehicle client to true");
}
}
} catch (ClassNotFoundException e) {
TestUtil.logTrace("VehicleClient class not found, so not a vehicle client.");
}
Expand Down

0 comments on commit aae21ed

Please sign in to comment.