mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[sinttest] Do not catch exceptions when destroying a MUC
If something goes wrong when destroying a MUC, we want to be notified about it immediately, as further results of the integration test run are unreliable anyway.
This commit is contained in:
parent
a36251ff7d
commit
6a78e4ad09
1 changed files with 6 additions and 8 deletions
|
@ -25,7 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
import org.jivesoftware.smack.MessageListener;
|
import org.jivesoftware.smack.MessageListener;
|
||||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||||
|
@ -797,17 +796,16 @@ public class MultiUserChatIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
* Destroys a MUC room, ignoring any exceptions.
|
* Destroys a MUC room, ignoring any exceptions.
|
||||||
*
|
*
|
||||||
* @param muc The room to destroy (can be null).
|
* @param muc The room to destroy (can be null).
|
||||||
|
* @throws InterruptedException if the calling thread was interrupted.
|
||||||
|
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||||
|
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||||
|
* @throws NoResponseException if there was no response from the remote entity.
|
||||||
*/
|
*/
|
||||||
static void tryDestroy(final MultiUserChat muc) {
|
static void tryDestroy(final MultiUserChat muc) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||||
if (muc == null) {
|
if (muc == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
muc.destroy("test fixture teardown", null);
|
||||||
muc.destroy("test fixture teardown", null);
|
|
||||||
} catch (NoResponseException | XMPPErrorException | NotConnectedException | InterruptedException ex) {
|
|
||||||
LOGGER.log(Level.FINEST, "Failed to tear down a randomly generated MUC (" + muc.getRoom()
|
|
||||||
+ ") used as a test fixture. Continuing anyway.", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void createMUC(MultiUserChat muc, String resourceName) throws NoResponseException, XMPPErrorException, InterruptedException, MultiUserChatException.MucAlreadyJoinedException, NotConnectedException, MultiUserChatException.MissingMucCreationAcknowledgeException, MultiUserChatException.NotAMucServiceException, XmppStringprepException {
|
private static void createMUC(MultiUserChat muc, String resourceName) throws NoResponseException, XMPPErrorException, InterruptedException, MultiUserChatException.MucAlreadyJoinedException, NotConnectedException, MultiUserChatException.MissingMucCreationAcknowledgeException, MultiUserChatException.NotAMucServiceException, XmppStringprepException {
|
||||||
|
|
Loading…
Reference in a new issue