промежуточный. рефакторинг отправки пакета сапфора на сервер. сделал подобно двм.
This commit is contained in:
@@ -7,17 +7,19 @@ import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import SapforTestingSystem.SapforConfiguration.SapforConfiguration;
|
||||
import SapforTestingSystem.SapforConfigurationCommand.SapforConfigurationCommand;
|
||||
import SapforTestingSystem.SapforTasksPackage_info;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
import TestingSystem.Group.Group;
|
||||
import TestingSystem.TasksPackage.TasksPackageState;
|
||||
import TestingSystem.Test.Test;
|
||||
import TestingSystem.TestingServer;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.TestingSystemPass;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class StartSapforTests extends TestingSystemPass<SapforTasksPackage_info> {
|
||||
public class StartSapforTests extends TestingSystemPass<SapforTasksPackage> {
|
||||
protected int allTasksCount = 0;
|
||||
//--
|
||||
protected LinkedHashMap<String, Vector<String>> groupsTests = null;
|
||||
@@ -176,15 +178,33 @@ public class StartSapforTests extends TestingSystemPass<SapforTasksPackage_info>
|
||||
//--
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
target = new SapforTasksPackage_info();
|
||||
target.email = Current.getAccount().email;
|
||||
target.sapforId = Current.getServerSapfor().id;
|
||||
target = new SapforTasksPackage();
|
||||
target.genName();
|
||||
//--
|
||||
Vector<String> testsIds = new Vector<>();
|
||||
Vector<String> configurationsIds = new Vector<>();
|
||||
for (Test test : allTests.values())
|
||||
target.testsIds.add(test.id);
|
||||
testsIds.add(test.id);
|
||||
//--
|
||||
for (SapforConfiguration configuration : Global.testingServer.db.sapforConfigurations.getCheckedItems())
|
||||
target.configurationsIds.add(configuration.id);
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.StartSapforTests, "", target));
|
||||
configurationsIds.add(configuration.id);
|
||||
//--
|
||||
target.testsIds = String.join("\n", testsIds);
|
||||
target.configurationsIds = String.join("\n", configurationsIds);
|
||||
//--
|
||||
target.sapforId = Current.getServerSapfor().id;
|
||||
target.sapfor_drv = Current.getServerSapfor().call_command;
|
||||
target.sapfor_version = Current.getServerSapfor().version;
|
||||
target.sapfor_build_date = Current.getServerSapfor().buildDate;
|
||||
//--
|
||||
target.testsNames = String.join(";", testsNames_lower);
|
||||
target.StartDate = new Date().getTime();
|
||||
target.kernels = TestingServer.kernels;
|
||||
target.state = TasksPackageState.Queued;
|
||||
//---
|
||||
Vector<SapforTasksPackage> packages = new Vector<>();
|
||||
packages.add(target);
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishAccountObjects, Current.getAccount().email, packages));
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user