mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-15 03:59:38 +02:00
Expose InterruptedException
SMACK-632
This commit is contained in:
parent
43b99a2a85
commit
bc61527bd2
124 changed files with 977 additions and 597 deletions
|
@ -59,9 +59,10 @@ public class InBandBytestreamManagerTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
@ -103,9 +104,10 @@ public class InBandBytestreamManagerTest {
|
|||
* bytestream.
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Test
|
||||
public void shouldFailIfTargetDoesNotSupportIBB() throws SmackException, XMPPException {
|
||||
public void shouldFailIfTargetDoesNotSupportIBB() throws SmackException, XMPPException, InterruptedException {
|
||||
InBandBytestreamManager byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);
|
||||
|
||||
try {
|
||||
|
@ -153,7 +155,7 @@ public class InBandBytestreamManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shouldUseConfiguredStanzaType() throws SmackException {
|
||||
public void shouldUseConfiguredStanzaType() throws SmackException, InterruptedException {
|
||||
InBandBytestreamManager byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);
|
||||
byteStreamManager.setStanza(StanzaType.MESSAGE);
|
||||
|
||||
|
|
|
@ -67,9 +67,10 @@ public class InBandBytestreamRequestTest {
|
|||
/**
|
||||
* Test reject() method.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Test
|
||||
public void shouldReplyWithErrorIfRequestIsRejected() throws NotConnectedException {
|
||||
public void shouldReplyWithErrorIfRequestIsRejected() throws NotConnectedException, InterruptedException {
|
||||
InBandBytestreamRequest ibbRequest = new InBandBytestreamRequest(
|
||||
byteStreamManager, initBytestream);
|
||||
|
||||
|
|
|
@ -75,9 +75,10 @@ public class InBandBytestreamSessionMessageTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
|
|
@ -76,9 +76,10 @@ public class InBandBytestreamSessionTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
|
|
@ -76,9 +76,10 @@ public class Socks5ByteStreamManagerTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
|
|
@ -64,9 +64,10 @@ public class Socks5ByteStreamRequestTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
|
|
@ -69,9 +69,10 @@ public class Socks5ClientForInitiatorTest {
|
|||
* Initialize fields used in the tests.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
public void setup() throws XMPPException, SmackException, InterruptedException {
|
||||
|
||||
// build protocol verifier
|
||||
protocol = new Protocol();
|
||||
|
|
|
@ -103,9 +103,10 @@ public class PingTest extends InitExtensions {
|
|||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Test
|
||||
public void checkFailedPingOnTimeout() throws SmackException, IOException, XMPPException {
|
||||
public void checkFailedPingOnTimeout() throws SmackException, IOException, XMPPException, InterruptedException {
|
||||
DummyConnection dummyCon = getAuthenticatedDummyConnectionWithoutIqReplies();
|
||||
PingManager pinger = PingManager.getInstanceFor(dummyCon);
|
||||
|
||||
|
@ -181,7 +182,7 @@ public class PingTest extends InitExtensions {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void checkPingToServerTimeout() throws SmackException, IOException, XMPPException {
|
||||
public void checkPingToServerTimeout() throws SmackException, IOException, XMPPException, InterruptedException {
|
||||
DummyConnection con = getAuthenticatedDummyConnectionWithoutIqReplies();
|
||||
PingManager pinger = PingManager.getInstanceFor(con);
|
||||
|
||||
|
@ -233,7 +234,7 @@ public class PingTest extends InitExtensions {
|
|||
assertFalse(pingSupported);
|
||||
}
|
||||
|
||||
private static ThreadedDummyConnection getAuthentiactedDummyConnection() throws SmackException, IOException, XMPPException {
|
||||
private static ThreadedDummyConnection getAuthentiactedDummyConnection() throws SmackException, IOException, XMPPException, InterruptedException {
|
||||
ThreadedDummyConnection connection = new ThreadedDummyConnection();
|
||||
connection.connect();
|
||||
connection.login();
|
||||
|
@ -247,8 +248,9 @@ public class PingTest extends InitExtensions {
|
|||
* @throws XMPPException
|
||||
* @throws IOException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private static DummyConnection getAuthenticatedDummyConnectionWithoutIqReplies() throws SmackException, IOException, XMPPException {
|
||||
private static DummyConnection getAuthenticatedDummyConnectionWithoutIqReplies() throws SmackException, IOException, XMPPException, InterruptedException {
|
||||
DummyConnection con = new DummyConnection();
|
||||
con.setPacketReplyTimeout(500);
|
||||
con.connect();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class ConfigureFormTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void getConfigFormWithInsufficientPriviliges() throws XMPPException, SmackException, IOException
|
||||
public void getConfigFormWithInsufficientPriviliges() throws XMPPException, SmackException, IOException, InterruptedException
|
||||
{
|
||||
ThreadedDummyConnection con = ThreadedDummyConnection.newInstance();
|
||||
PubSubManager mgr = new PubSubManager(con);
|
||||
|
@ -77,7 +77,7 @@ public class ConfigureFormTest
|
|||
}
|
||||
|
||||
@Test (expected=SmackException.class)
|
||||
public void getConfigFormWithTimeout() throws XMPPException, SmackException
|
||||
public void getConfigFormWithTimeout() throws XMPPException, SmackException, InterruptedException
|
||||
{
|
||||
ThreadedDummyConnection con = new ThreadedDummyConnection();
|
||||
PubSubManager mgr = new PubSubManager(con);
|
||||
|
|
|
@ -64,9 +64,10 @@ public class ConnectionUtils {
|
|||
* @return a mocked XMPP connection
|
||||
* @throws SmackException
|
||||
* @throws XMPPErrorException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static XMPPConnection createMockedConnection(final Protocol protocol,
|
||||
String initiatorJID, String xmppServer) throws SmackException, XMPPErrorException {
|
||||
String initiatorJID, String xmppServer) throws SmackException, XMPPErrorException, InterruptedException {
|
||||
|
||||
// mock XMPP connection
|
||||
XMPPConnection connection = mock(XMPPConnection.class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue