This commit is contained in:
2023-10-06 21:01:52 +03:00
parent e95ca3e179
commit 8f5945e560
4 changed files with 37 additions and 8 deletions

10
.idea/workspace.xml generated
View File

@@ -8,13 +8,9 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/GlobalDatabase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforConfiguration/SapforConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforConfiguration/SapforConfigurationDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforScenario/SapforScenariosDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforScenario/SapforScenariosDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTestsOnServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTestsOnServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforScenario.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforScenario.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -169,5 +169,8 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
} else
break;
}
//теперь строим деревья версий.
}
}

View File

@@ -185,6 +185,12 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
((ServerSapfor) object).home_path
)
);
} else if (object instanceof SapforScenario) {
Utils.forceDeleteWithCheck(
new File(
((SapforScenario) object).workspace
)
);
}
}
@Override

View File

@@ -2,8 +2,12 @@ package Visual_DVM_2021.Passes.All;
import Common.Database.Database;
import Common.Global;
import Common.Utils.Utils;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import SapforTestingSystem.SapforScenario.SapforScenario;
import Visual_DVM_2021.Passes.DeleteObjectPass;
import Visual_DVM_2021.Passes.Pass_2021;
import Visual_DVM_2021.Passes.TestingSystemPass;
import java.io.File;
public class DeleteSapforScenario extends DeleteObjectPass<SapforScenario> {
@@ -12,7 +16,7 @@ public class DeleteSapforScenario extends DeleteObjectPass<SapforScenario> {
}
@Override
protected Database getDb() {
return Global.db;
return Global.testingServer.db;
}
@Override
protected void performPreparation() throws Exception {
@@ -27,4 +31,24 @@ public class DeleteSapforScenario extends DeleteObjectPass<SapforScenario> {
super.body();
Utils.delete_with_check(new File(target.workspace));
}
@Override
protected void performDone() throws Exception {
super.performDone();
Pass_2021 serverPass = new TestingSystemPass<SapforScenario>() {
@Override
public String getDescription() {
return "Удаление сценария задач SAPFOR с сервера";
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = (SapforScenario) args[0];
return true;
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.DeleteObject, "", target));
}
};
serverPass.Do(target);
}
}