diff --git a/lib/testing.properties b/lib/testing.properties index 6f11a0c0d..4dbd31ff2 100644 --- a/lib/testing.properties +++ b/lib/testing.properties @@ -21,6 +21,7 @@ net.java.sip.communicator.slick.runner.TEST_LIST=ConfigurationServiceLick \ JabberProtocolProviderSlick \ YahooProtocolProviderSlick \ MsnProtocolProviderSlick \ + SipProtocolProviderServiceLick \ GibberishProtocolProviderServiceLick \ RssProtocolProviderServiceLick \ PopupMessageHandlerSLick @@ -35,7 +36,7 @@ net.java.sip.communicator.slick.runner.TEST_LIST=ConfigurationServiceLick \ # because the addSuite calls are commented-out in start(). # # MediaServiceLick because one of the 2 tests fails. -# SipProtocolProviderServiceLick +# # # GenericProtocolProviderServiceLick because it does not add any tests. # diff --git a/test/net/java/sip/communicator/slick/protocol/sip/SipSlickFixture.java b/test/net/java/sip/communicator/slick/protocol/sip/SipSlickFixture.java index 6c006e10e..d9375e715 100644 --- a/test/net/java/sip/communicator/slick/protocol/sip/SipSlickFixture.java +++ b/test/net/java/sip/communicator/slick/protocol/sip/SipSlickFixture.java @@ -266,12 +266,18 @@ public void clearProvidersLists() ContactGroup rootGroup1 = opSetPersPresence1.getServerStoredContactListRoot(); + // used to pause between changes in order servers to be happy + Object lock = new Object(); + // first delete the groups Iterator cgiter = rootGroup1.subgroups(); while (cgiter.hasNext()) { ContactGroup item = cgiter.next(); opSetPersPresence1.removeServerStoredContactGroup(item); + synchronized(lock){ + lock.wait(1000); + } cgiter = rootGroup1.subgroups(); } @@ -280,6 +286,9 @@ public void clearProvidersLists() while (citer.hasNext()) { opSetPersPresence1.unsubscribe(citer.next()); + synchronized(lock){ + lock.wait(1000); + } citer = rootGroup1.contacts(); } @@ -292,6 +301,9 @@ public void clearProvidersLists() while (cgiter.hasNext()) { ContactGroup item = cgiter.next(); + synchronized(lock){ + lock.wait(1000); + } opSetPersPresence2.removeServerStoredContactGroup(item); } @@ -300,6 +312,9 @@ public void clearProvidersLists() while (citer.hasNext()) { opSetPersPresence2.unsubscribe(citer.next()); + synchronized(lock){ + lock.wait(1000); + } citer = rootGroup2.contacts(); } } 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 f77b9ac42..12e0719c9 100644 --- a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java +++ b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetBasicInstantMessaging.java @@ -257,7 +257,7 @@ public void firstTestReceiveMessage() opSetBasicIM2.sendInstantMessage(testerAgentContact, opSetBasicIM2.createMessage(body)); - evtCollector.waitForEvent(10000); + evtCollector.waitForEvent(25000); opSetBasicIM1.removeMessageListener(evtCollector); @@ -323,6 +323,9 @@ public void thenTestSendMessage() Contact testerAgentContact = opSetPresence1.findContactByID(fixture.userID2); + logger.debug("Will send message " + body + + " to: " + testerAgentContact.getAddress()); + opSetBasicIM1.sendInstantMessage(testerAgentContact, msg); imEvtCollector1.waitForEvent(10000); 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 38c921223..1bf85b4a1 100644 --- a/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java +++ b/test/net/java/sip/communicator/slick/protocol/sip/TestOperationSetPresence.java @@ -228,6 +228,14 @@ public void subtestStateTransition(PresenceStatus newStatus) newStatus, this.operationSetPresence1.getPresenceStatus()); + // Will wait for the status to be received before quering for it + Object lock = new Object(); + synchronized(lock) + { + logger.trace("Will wait status to be received from the other side!"); + lock.wait(5000); + } + PresenceStatus actualStatus = this.operationSetPresence2.queryContactStatus(this.fixture.userID1); @@ -401,7 +409,7 @@ public void postTestSubscribe() synchronized(lock) { logger.info("Will wait all subscription events to be received"); - lock.wait(3000); + lock.wait(10000); } // make the user agent tester change its states and make sure we are