Skip to content

Commit 0f7d273

Browse files
author
SadiJr
committed
Address Bryan reviews
1 parent c421ce7 commit 0f7d273

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,12 @@ public Pair<Boolean, String> restoreVMToDifferentLocation(String restorePointId,
738738
}
739739

740740
/**
741-
* Tries to retrieve the error's descripton of the Veeam restore task that errored.
742-
* @param uid Session uid in Veeam of restore process;
743-
* @return the description found in Veeam about the cause of error in restore process.
741+
* Tries to retrieve the error's description of the Veeam restore task that resulted in an error.
742+
* @param uid Session uid in Veeam of the restore process;
743+
* @return the description found in Veeam about the cause of error in the restore process.
744744
*/
745745
protected String getRestoreVmErrorDescription(String uid) {
746-
LOG.debug(String.format("Trying to find cause of error in restore process [%s].", uid));
746+
LOG.debug(String.format("Trying to find the cause of error in the restore process [%s].", uid));
747747
List<String> cmds = Arrays.asList(
748748
String.format("$restoreUid = '%s'", uid),
749749
"$restore = Get-VBRRestoreSession -Id $restoreUid",
@@ -757,6 +757,6 @@ protected String getRestoreVmErrorDescription(String uid) {
757757
if (result != null && result.first()) {
758758
return result.second();
759759
}
760-
return String.format("Failed to get description of failed restore session [%s]. Please contact an administrator.", uid);
760+
return String.format("Failed to get the description of the failed restore session [%s]. Please contact an administrator.", uid);
761761
}
762762
}

plugins/backup/veeam/src/test/java/org/apache/cloudstack/backup/veeam/VeeamClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void getRestoreVmErrorDescriptionTestWhenPowerShellOutputIsNull() {
188188
Mockito.when(mock.getRestoreVmErrorDescription("uuid")).thenCallRealMethod();
189189
Mockito.when(mock.executePowerShellCommands(Mockito.any())).thenReturn(null);
190190
String result = mock.getRestoreVmErrorDescription("uuid");
191-
Assert.assertEquals("Failed to get description of failed restore session [uuid]. Please contact an administrator.", result);
191+
Assert.assertEquals("Failed to get the description of the failed restore session [uuid]. Please contact an administrator.", result);
192192
}
193193

194194
@Test
@@ -197,7 +197,7 @@ public void getRestoreVmErrorDescriptionTestWhenPowerShellOutputIsFalse() {
197197
Mockito.when(mock.getRestoreVmErrorDescription("uuid")).thenCallRealMethod();
198198
Mockito.when(mock.executePowerShellCommands(Mockito.any())).thenReturn(response);
199199
String result = mock.getRestoreVmErrorDescription("uuid");
200-
Assert.assertEquals("Failed to get description of failed restore session [uuid]. Please contact an administrator.", result);
200+
Assert.assertEquals("Failed to get the description of the failed restore session [uuid]. Please contact an administrator.", result);
201201
}
202202

203203
}

0 commit comments

Comments
 (0)