убрал сброс соединения. сделал удаление папок новых пакетов при их удалении с бд

This commit is contained in:
2023-12-15 15:45:43 +03:00
parent 57a98475d0
commit 730ded1f4c
3 changed files with 27 additions and 13 deletions

7
.idea/workspace.xml generated
View File

@@ -6,7 +6,12 @@
</artifacts-to-build> </artifacts-to-build>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="" /> <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/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />

View File

@@ -151,15 +151,16 @@ public abstract class TestingPlanner<P extends TestingPackage> {
Kill(); Kill();
UpdatePackageState(TasksPackageState.Aborted); UpdatePackageState(TasksPackageState.Aborted);
EmailPackage(); EmailPackage();
} else } else {
Session(); Session();
}
} }
} catch (Exception ex) { } catch (Exception ex) {
Print("Ошибка сеанса."); Print("Ошибка сеанса. Соединение будет разорвано.");
Print(ex.getMessage()); Print(ex.getMessage());
} finally {
Disconnect(); Disconnect();
} } finally {}
} }
//-- //--
testingPackage.destructor(); testingPackage.destructor();

View File

@@ -371,16 +371,24 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
} }
@Override @Override
protected boolean Connect() { protected boolean Connect() {
try { if (user.connection==null) {
user.connection = null; try {
user.connection = new UserConnection(machine, user); user.connection = new UserConnection(machine, user);
Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено."); Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
} catch (Exception ex) { } catch (Exception ex) {
Print(ex.toString()); Print(ex.toString());
user.connection = null; user.connection = null;
Print("Не удалось установить соединение."); Print("Не удалось установить соединение.");
}
} }
return user.connection != null; return user.connection != null;
} }
@Override
protected void Disconnect() {
if (user.connection != null) {
user.connection.Disconnect();
user.connection = null;
}
}
//-- //--
} }