mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 23:42:06 +01:00
Improved teardown logic. An error while deleting an account does no longer stop the tear down process (i.e. deletion of the other accounts).
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6530 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
7828c5005b
commit
d63a4f1fbe
1 changed files with 10 additions and 3 deletions
|
@ -233,9 +233,16 @@ public abstract class SmackTestCase extends TestCase {
|
||||||
for (int i = 0; i < getMaxConnections(); i++) {
|
for (int i = 0; i < getMaxConnections(); i++) {
|
||||||
if (getConnection(i).isConnected()) {
|
if (getConnection(i).isConnected()) {
|
||||||
// Delete the created account for the test
|
// Delete the created account for the test
|
||||||
getConnection(i).getAccountManager().deleteAccount();
|
try {
|
||||||
// Close the connection
|
getConnection(i).getAccountManager().deleteAccount();
|
||||||
getConnection(i).disconnect();
|
}
|
||||||
|
catch (XMPPException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
if (getConnection(i).isConnected()) {
|
||||||
|
// Close the connection
|
||||||
|
getConnection(i).disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue