aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Pradelle <pradelle@java.net>2007-06-20 20:42:25 +0000
committerBenoit Pradelle <pradelle@java.net>2007-06-20 20:42:25 +0000
commita3c946c2e3130cc39d7489fbb0221d127f2d8d9d (patch)
tree94f537594c30601998be33d23067a526f2e15711
parent99c943c9910a36a9f5157b88f0e859b5a1130413 (diff)
downloadjitsi-a3c946c2e3130cc39d7489fbb0221d127f2d8d9d.zip
jitsi-a3c946c2e3130cc39d7489fbb0221d127f2d8d9d.tar.gz
jitsi-a3c946c2e3130cc39d7489fbb0221d127f2d8d9d.tar.bz2
Activate the test case for the SIP IM with some corrections to make it more stable.
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicInstantMessagingSipImpl.java2
-rw-r--r--test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java8
-rw-r--r--test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java22
3 files changed, 26 insertions, 6 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicInstantMessagingSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicInstantMessagingSipImpl.java
index fe65cc1..1178acc 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicInstantMessagingSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicInstantMessagingSipImpl.java
@@ -924,6 +924,8 @@ public class OperationSetBasicInstantMessagingSipImpl
}
catch (OperationFailedException ex)
{
+ logger.error("can't solve the challenge", ex);
+
// error for delivering the message
MessageDeliveryFailedEvent evt =
new MessageDeliveryFailedEvent(
diff --git a/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java b/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java
index 406705d..05f1662 100644
--- a/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java
+++ b/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java
@@ -58,12 +58,8 @@ public class SipProtocolProviderServiceLick
//made to login/authenticate/signon its service provider.
addTestSuite(TestProtocolProviderServiceSipImpl.class);
- //The following test may suffer from a problem in a specific
- //situation. It is possible for an authenticated message to being
- //resend after some time (and to be re-handled). As two tests are
- //launched the second, may received this resent message and fail.
- //Uncomment to activate it.
- //addTest(TestOperationSetBasicInstantMessaging.suite());
+ //IM test
+ addTest(TestOperationSetBasicInstantMessaging.suite());
addTestSuite(TestOperationSetBasicTelephonySipImpl.class);
diff --git a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java
index 79b5701..c2665ca 100644
--- a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java
+++ b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java
@@ -285,6 +285,17 @@ public class TestOperationSetBasicInstantMessaging
assertEquals("message content type"
, OperationSetBasicInstantMessaging.DEFAULT_MIME_TYPE
, evt.getSourceMessage().getContentType());
+
+ // ensure that we received every messages event
+ try {
+ synchronized (this) {
+ wait(5000);
+ }
+ } catch (InterruptedException e) {
+ // just log and continue
+ logger.debug("the first test's wait has been interrupted, the "
+ + "second test may fail", e);
+ }
}
/**
@@ -344,6 +355,17 @@ public class TestOperationSetBasicInstantMessaging
((MessageReceivedEvent)imEvtCollector2.collectedEvents
.get(0)).getSourceMessage().getContent();
assertEquals("received message body", msg.getContent(), receivedBody);
+
+ // ensure that we received every messages event
+ try {
+ synchronized (this) {
+ wait(5000);
+ }
+ } catch (InterruptedException e) {
+ // just log and continue
+ logger.debug("the second test's wait has been interrupted, the "
+ + "following test may fail", e);
+ }
}
/**