diff options
author | Benoit Pradelle <pradelle@java.net> | 2007-07-25 15:56:24 +0000 |
---|---|---|
committer | Benoit Pradelle <pradelle@java.net> | 2007-07-25 15:56:24 +0000 |
commit | 28633e9767f11b181200c19b8a63be5a341c7fed (patch) | |
tree | 35839fbfc9cd820ae281c268cacca1647836c430 | |
parent | f083d85578fbc2bbf57ae9b62efaa417aa82ea8d (diff) | |
download | jitsi-28633e9767f11b181200c19b8a63be5a341c7fed.zip jitsi-28633e9767f11b181200c19b8a63be5a341c7fed.tar.gz jitsi-28633e9767f11b181200c19b8a63be5a341c7fed.tar.bz2 |
(trying to) fix some problems with the SIMPLE test cases on cruise control
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java | 5 | ||||
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java index 6882f67..8cbddea 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java @@ -264,7 +264,9 @@ public class OperationSetPresenceSipImpl // if we force the p2p mode, we start by not using a distant PA this.useDistantPA = !forceP2PMode; - this.subscriptionDuration = subscriptionExpiration; + if (subscriptionDuration > 0) { + this.subscriptionDuration = subscriptionExpiration; + } this.presenceEnabled = isPresenceEnabled; } @@ -738,6 +740,7 @@ public class OperationSetPresenceSipImpl listener.providerStatusMessageChanged(evt); } + logger.debug("status dispatching done."); } /** diff --git a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java index b22e9fa..b32e464 100644 --- a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java +++ b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java @@ -398,6 +398,15 @@ public class TestOperationSetPresence subEvtCollector.collectedEvents.clear(); + // wait to be sure that every responses for the subscribe have been + // received + Object lock = new Object(); + synchronized(lock) + { + logger.info("Will wait all subscription events to be received"); + lock.wait(3000); + } + // make the user agent tester change its states and make sure we are // notified logger.debug("Testing presence notifications."); @@ -482,10 +491,9 @@ public class TestOperationSetPresence // happens if the user is already subscribed } - Object lock = new Object(); synchronized(lock) { - logger.info("Will wait all subscriptioin events to be received by" + + logger.info("Will wait all subscription events to be received by" + " lib"); lock.wait(3000); logger.info("Stopped waiting"); |