mirror of
https://repository.entgra.net/community/product-iots.git
synced 2025-09-16 23:32:19 +00:00
Changes suggested in the Code review.
This commit is contained in:
parent
f7cf6fe56e
commit
130cad34ee
@ -65,7 +65,7 @@ public class SampleInstallationTest extends IOTIntegrationUIBaseTestCase {
|
|||||||
private Process tempProcess = null;
|
private Process tempProcess = null;
|
||||||
private Properties properties = System.getProperties();
|
private Properties properties = System.getProperties();
|
||||||
private String carbonHome = properties.getProperty(Constants.CARBON_HOME);
|
private String carbonHome = properties.getProperty(Constants.CARBON_HOME);
|
||||||
private String[] cmdArray;
|
private String[] commands;
|
||||||
private LogViewerClient logViewerClient;
|
private LogViewerClient logViewerClient;
|
||||||
|
|
||||||
@BeforeClass(alwaysRun = true)
|
@BeforeClass(alwaysRun = true)
|
||||||
@ -84,12 +84,12 @@ public class SampleInstallationTest extends IOTIntegrationUIBaseTestCase {
|
|||||||
try {
|
try {
|
||||||
if (System.getProperty(Constants.OS_NAME).toLowerCase().contains("windows")) {
|
if (System.getProperty(Constants.OS_NAME).toLowerCase().contains("windows")) {
|
||||||
log.info("Executing maven clean install --------------------------------");
|
log.info("Executing maven clean install --------------------------------");
|
||||||
cmdArray = new String[]{"cmd.exe", "/c", "mvn clean install"};
|
commands = new String[]{"cmd.exe", "/c", "mvn clean install"};
|
||||||
tempProcess = Runtime.getRuntime().exec(cmdArray, null, dir);
|
tempProcess = Runtime.getRuntime().exec(commands, null, dir);
|
||||||
} else {
|
} else {
|
||||||
log.info("Executing maven clean install --------------------------------");
|
log.info("Executing maven clean install --------------------------------");
|
||||||
cmdArray = new String[]{"mvn", "clean", "install"};
|
commands = new String[]{"mvn", "clean", "install"};
|
||||||
tempProcess = Runtime.getRuntime().exec(cmdArray, null, dir);
|
tempProcess = Runtime.getRuntime().exec(commands, null, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean buildStatus = waitForMessage(tempProcess.getInputStream(), Constants.BUILD_SUCCESS_MSG);
|
boolean buildStatus = waitForMessage(tempProcess.getInputStream(), Constants.BUILD_SUCCESS_MSG);
|
||||||
@ -111,11 +111,11 @@ public class SampleInstallationTest extends IOTIntegrationUIBaseTestCase {
|
|||||||
log.info("Sample installation started : mvn clean install -f device-deployer.xml");
|
log.info("Sample installation started : mvn clean install -f device-deployer.xml");
|
||||||
try {
|
try {
|
||||||
if (System.getProperty(Constants.OS_NAME).toLowerCase().contains("windows")) {
|
if (System.getProperty(Constants.OS_NAME).toLowerCase().contains("windows")) {
|
||||||
cmdArray = new String[]{"cmd.exe", "/c", "mvn clean install -f device-deployer.xml"};
|
commands = new String[]{"cmd.exe", "/c", "mvn clean install -f device-deployer.xml"};
|
||||||
tempProcess = Runtime.getRuntime().exec(cmdArray, null, dir);
|
tempProcess = Runtime.getRuntime().exec(commands, null, dir);
|
||||||
} else {
|
} else {
|
||||||
cmdArray = new String[]{"mvn", "clean", "install", "-f", "device-deployer.xml"};
|
commands = new String[]{"mvn", "clean", "install", "-f", "device-deployer.xml"};
|
||||||
tempProcess = Runtime.getRuntime().exec(cmdArray, null, dir);
|
tempProcess = Runtime.getRuntime().exec(commands, null, dir);
|
||||||
}
|
}
|
||||||
boolean buildStatus = waitForMessage(tempProcess.getInputStream(), Constants.BUILD_SUCCESS_MSG);
|
boolean buildStatus = waitForMessage(tempProcess.getInputStream(), Constants.BUILD_SUCCESS_MSG);
|
||||||
Assert.assertTrue(buildStatus, "Sample installation was not successful");
|
Assert.assertTrue(buildStatus, "Sample installation was not successful");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user