Skip to content

Commit

Permalink
Merge branch 'main' into user/lsh/generalize-file-system (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivershen-wow authored Mar 2, 2023
1 parent 08cd2f3 commit 1bd3b42
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ public DeviceManager initDeviceManager(BlobStorageClient deviceLabBlobClient, AD
}
}
deviceManager.setPreAppDir(preAppDir);
deviceManager.setPreInstallPolicy(
shutdownIfFail ? Const.PreInstallPolicy.SHUTDOWN : Const.PreInstallPolicy.IGNORE);
deviceManager.setPreInstallFailurePolicy(
shutdownIfFail ? Const.PreInstallFailurePolicy.SHUTDOWN : Const.PreInstallFailurePolicy.IGNORE);
deviceManager.setDeviceStatusListenerManager(deviceStatusListenerManager);
deviceManager.setTestBaseDirUrlMapping(AppOptions.TEST_CASE_RESULT_STORAGE_MAPPING_REL_PATH);
File deviceLogBaseDir = new File(appOptions.getDeviceLogStorageLocation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public abstract class DeviceManager {
protected BlobStorageClient blobStorageClient;
protected File testBaseDir;
protected File preAppDir;
protected String preInstallPolicy;
protected String preInstallFailurePolicy;

public String getPreInstallPolicy() {
return preInstallPolicy;
public String getPreInstallFailurePolicy() {
return preInstallFailurePolicy;
}

public void setPreInstallPolicy(String preInstallPolicy) {
this.preInstallPolicy = preInstallPolicy;
public void setPreInstallFailurePolicy(String preInstallFailurePolicy) {
this.preInstallFailurePolicy = preInstallFailurePolicy;
}

protected String testBaseDirUrlMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void onDeviceConnected(DeviceInfo deviceInfo) {
} catch (Exception e) {
String errorMessage = String.format("Pre-Install %s failed", appFile.getAbsolutePath());
classLogger.error(errorMessage, e);
if (Const.PreInstallPolicy.SHUTDOWN.equals(deviceManager.getPreInstallPolicy())) {
if (Const.PreInstallFailurePolicy.SHUTDOWN.equals(deviceManager.getPreInstallFailurePolicy())) {
throw new HydraLabRuntimeException(HttpStatus.INTERNAL_SERVER_ERROR.value(), errorMessage, e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ interface AuthComponent {
String AUTHORITY = "AUTHORITY";
}

interface PreInstallPolicy{
interface PreInstallFailurePolicy {
String SHUTDOWN = "SHUTDOWN";
String IGNORE = "IGNORE";
}
Expand Down

0 comments on commit 1bd3b42

Please sign in to comment.