рабочий вариант отдельных процессов на разные машины
This commit is contained in:
@@ -35,6 +35,7 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
boolean local;
|
||||
RemoteFile packageRemoteWorkspace = null;
|
||||
File packageLocalWorkspace = null;
|
||||
String serverName = "";
|
||||
//----
|
||||
public MachineQueueSupervisor(String... args) {
|
||||
Global.isWindows = System.getProperty("os.name").startsWith("Windows");
|
||||
@@ -45,6 +46,7 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
String userPassword = args[3];
|
||||
String userWorkspace = args[4];
|
||||
String testingSystemRoot = args[5];
|
||||
serverName = args[6];
|
||||
supervisorHome = new File(Global.Home); //при инициализации это текущая папка.
|
||||
//---
|
||||
Global.Log = new Loggable() {
|
||||
@@ -74,6 +76,7 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
Print("userWorkspace=" + Utils.Brackets(userWorkspace));
|
||||
Print("root=" + Utils.Brackets(Global.Home));
|
||||
Print("local=" + local);
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
File started = new File(supervisorHome, Constants.STARTED);
|
||||
@@ -454,11 +457,13 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
}
|
||||
@Override
|
||||
protected void MachineConnectionError() {
|
||||
System.out.println("MACHINE CONNECTION ERROR");
|
||||
Finalize("Количество безуспешных попыток соединения с машиной " + machine.getURL() +
|
||||
" превысило 10");
|
||||
}
|
||||
@Override
|
||||
protected void ServerConnectionError(ServerCode code_in) throws Exception {
|
||||
System.out.println("NO SERVER");
|
||||
Finalize("Не удалось выполнить команду " + code_in + " на сервере тестирования");
|
||||
}
|
||||
@Override
|
||||
@@ -470,6 +475,12 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
@Override
|
||||
public void Perform() {
|
||||
try {
|
||||
String currentServerName = (String) ServerCommand(ServerCode.GetServerName);
|
||||
System.out.println("current serverName="+Utils.Brackets(currentServerName));
|
||||
System.out.println("serverName="+Utils.Brackets(serverName));
|
||||
if (!serverName.equals(currentServerName)){
|
||||
Finalize("Устаревшее имя сервера");
|
||||
}
|
||||
testingPackage = null;
|
||||
Vector<DVMPackage> activePackages = (Vector<DVMPackage>) ServerCommand(getActivePackagesCode(), machine.getURL(), null);
|
||||
// System.out.println(this.getClass().getSimpleName()+": found "+activePackages.size()+" active packages");
|
||||
|
||||
Reference in New Issue
Block a user