убрал сброс соединения. сделал удаление папок новых пакетов при их удалении с бд
This commit is contained in:
7
.idea/workspace.xml
generated
7
.idea/workspace.xml
generated
@@ -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" />
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -371,8 +371,8 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean Connect() {
|
protected boolean Connect() {
|
||||||
|
if (user.connection==null) {
|
||||||
try {
|
try {
|
||||||
user.connection = null;
|
|
||||||
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) {
|
||||||
@@ -380,7 +380,15 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
|||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
//--
|
//--
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user