промежуточный. в таблицах пакетов открытие текущего пакета по 2 клику
This commit is contained in:
@@ -1288,18 +1288,6 @@ public class Utils {
|
||||
System.out.println(new Date(dates.lastElement()));
|
||||
return dates.firstElement();
|
||||
}
|
||||
//методы работают только с непустыми запакованными данными
|
||||
public static Vector<Integer> unpackIntegers(String packed, String separator) {
|
||||
Vector<Integer> ids = new Vector<>();
|
||||
String[] data = packed.split(separator);
|
||||
if (data.length > 0) {
|
||||
for (String s : data) {
|
||||
if (!s.isEmpty())
|
||||
ids.add(Integer.parseInt(s));
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
public static Vector<String> unpack_s(String packed, String separator) {
|
||||
Vector<String> ids = new Vector<>();
|
||||
String[] data = packed.split(separator);
|
||||
|
||||
@@ -168,20 +168,21 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Test test;
|
||||
int test_id;
|
||||
switch (code) {
|
||||
//TODO запрос на принудительное автоматическое тестирование заданной версии сапфор.
|
||||
case PerformAutoSapforTesting:
|
||||
Print("Запустить автоматическое тестирование SAPFOR");
|
||||
TextLog Log = new TextLog();
|
||||
tryAutoSapforTesting(Log);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
if (!Log.isEmpty()) {
|
||||
EmailMessage message = new EmailMessage(
|
||||
"Не удалось запустить автоматическое тестирование системы SAPFOR",
|
||||
EmailMessage message = Log.isEmpty()?
|
||||
new EmailMessage(
|
||||
"Запущено автоматической тестирование версии "+request.arg+" системы SAPFOR",
|
||||
"", new Vector<>()):
|
||||
new EmailMessage(
|
||||
"Не удалось запустить автоматическое тестирование версии "+request.arg+" системы SAPFOR",
|
||||
Log.toString(),
|
||||
new Vector<>()
|
||||
);
|
||||
Email(message);
|
||||
}
|
||||
Email(message);
|
||||
break;
|
||||
case DownloadTest:
|
||||
Print("Отправить клиенту тест " + request.arg);
|
||||
@@ -640,5 +641,19 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
afterPublishAction(target);
|
||||
//--
|
||||
}
|
||||
/*
|
||||
public void PATCH(){
|
||||
for (SapforPackage sapforPackage: db.sapforPackages.Data.values()){
|
||||
try {
|
||||
sapforPackage.readJson();
|
||||
sapforPackage.state=sapforPackage.package_json.getState();
|
||||
db.Update(sapforPackage);
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import Common.UI.UI;
|
||||
import Common.UI.VisualCache.PackageCache;
|
||||
import Common.UI.VisualCache.VisualCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
@@ -60,6 +62,10 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
||||
Global.testingServer.db.dvmRunTasks.ShowNoPackage();
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void MouseAction2() throws Exception {
|
||||
Pass_2021.passes.get(PassCode_2021.DownloadDVMPackage).Do();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -137,4 +137,11 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//патч.потом удалить.
|
||||
public SapforConfiguration getConfigurationByDescription(String description){
|
||||
for (SapforConfiguration sapforConfiguration: Data.values())
|
||||
if (sapforConfiguration.description.equals(description))
|
||||
return sapforConfiguration;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class SapforPackage extends TestingPackage<SapforPackage_json> {
|
||||
public int sapforId = Constants.Nan; // так как сапфор на машине.
|
||||
//--------------
|
||||
public SapforPackage() {
|
||||
}
|
||||
public SapforPackage(SapforPackage sapforPackage) {
|
||||
|
||||
@@ -6,6 +6,8 @@ import Common.UI.VisualCache.ConfigurationCache;
|
||||
import Common.UI.VisualCache.PackageCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import javax.security.auth.login.CredentialNotFoundException;
|
||||
import java.util.Arrays;
|
||||
@@ -47,6 +49,10 @@ public class SapforPackageDBTable extends iDBTable<SapforPackage> {
|
||||
columns.get(9).setRenderer(RendererDate);
|
||||
columns.get(10).setRenderer(RendererStatusEnum);
|
||||
}
|
||||
@Override
|
||||
public void MouseAction2() throws Exception {
|
||||
Pass_2021.passes.get(PassCode_2021.CompareSapforPackages).Do();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -261,6 +261,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
//--
|
||||
UpdateSapforState(ServerSapforState.Done);
|
||||
EmailSapforAssembly(current_version, true, sapforOut, sapforErr);
|
||||
//запуск автоматического тестирования.
|
||||
ServerCommand(ServerCode.PerformAutoSapforTesting, String.valueOf(sapfor.id));
|
||||
} else {
|
||||
UpdateSapforState(ServerSapforState.DoneWithErrors);
|
||||
EmailSapforAssembly(current_version, false, sapforOut, sapforErr);
|
||||
|
||||
@@ -1,20 +1,39 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
||||
public class TestPass extends TestingSystemPass<ServerSapfor> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (Current.Check(Log, Current.ServerSapfor)) {
|
||||
target = Current.getServerSapfor();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class TestPass extends Pass_2021 {
|
||||
/*
|
||||
LinkedHashMap<Integer,SapforConfiguration> unpackConfigurationsOld(SapforPackage sapforPackage){
|
||||
LinkedHashMap<Integer,SapforConfiguration> res = new LinkedHashMap<>();
|
||||
Vector<String> names = Utils.unpack_s(sapforPackage.configurationsNames,";");
|
||||
for (String name: names) {
|
||||
SapforConfiguration configuration = Global.testingServer.db.sapforConfigurations.getConfigurationByDescription(name);
|
||||
if ((configuration!=null)&&!res.containsKey(configuration.id)){
|
||||
res.put(configuration.id,configuration);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PerformAutoSapforTesting, String.valueOf(target.id) ));
|
||||
protected void body() throws Exception {
|
||||
// LinkedHashMap<Integer>
|
||||
for (SapforPackage sapforPackage: Global.testingServer.db.sapforPackages.Data.values()){
|
||||
LinkedHashMap<Integer,SapforConfiguration> configurations = unpackConfigurationsOld(sapforPackage);
|
||||
sapforPackage.saveConfigurationsAsJson(new Vector<>(configurations.values()));
|
||||
Global.testingServer.db.Update(sapforPackage);
|
||||
}
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (SapforPackage sapforPackage: Global.testingServer.db.sapforPackages.Data.values()){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user