diff options
author | Damian Minkov <damencho@jitsi.org> | 2010-01-06 10:04:18 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2010-01-06 10:04:18 +0000 |
commit | 5662485c70f3bffb928b3ba49e8d34746d2e4512 (patch) | |
tree | 534410d94c8915ad57a4cdd30d159b7e2be411d1 | |
parent | 4594ba57f097562c3421f4926c3d46b643199a0f (diff) | |
download | jitsi-5662485c70f3bffb928b3ba49e8d34746d2e4512.zip jitsi-5662485c70f3bffb928b3ba49e8d34746d2e4512.tar.gz jitsi-5662485c70f3bffb928b3ba49e8d34746d2e4512.tar.bz2 |
Enable sip tests.
-rw-r--r-- | build.xml | 19 | ||||
-rw-r--r-- | lib/accounts.properties.template | 4 | ||||
-rw-r--r-- | lib/felix.unit.test.properties | 1 | ||||
-rw-r--r-- | lib/testing.properties | 2 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java | 10 | ||||
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java | 2 |
6 files changed, 30 insertions, 8 deletions
@@ -553,6 +553,17 @@ <propertyref prefix="accounts"/> <propertyref prefix="net"/> </syspropertyset> + + <!-- Setting properties necessary for dependencies on native libs.--> + <sysproperty key="java.library.path" + path="${ld.library.path}:${path}:${dyld.library.path}"/> + <sysproperty key="jna.library.path" + path="${ld.library.path}:${path}:${dyld.library.path}"/> + + <env key="LD_LIBRARY_PATH" path="${ld.library.path}"/> + <env key="PATH" path="${path}"/> + <env key="DYLD_LIBRARY_PATH" path="${dyld.library.path}"/> + </java> <!-- Generate the html report. @@ -680,16 +691,16 @@ <sysproperty key="jna.library.path" path="${ld.library.path}:${path}:${dyld.library.path}"/> + <env key="LD_LIBRARY_PATH" path="${ld.library.path}"/> + <env key="PATH" path="${path}"/> + <env key="DYLD_LIBRARY_PATH" path="${dyld.library.path}"/> + <!-- pass l10n properties from ant call for easy translation debugging --> <sysproperty key="user.language" value="${user.language}" /> <sysproperty key="user.country" value="${user.country}" /> <sysproperty key="user.variant" value="${user.variant}" /> - <env key="LD_LIBRARY_PATH" path="${ld.library.path}"/> - <env key="PATH" path="${path}"/> - <env key="DYLD_LIBRARY_PATH" path="${dyld.library.path}"/> - <!-- make sure that we automatically enable system.out when running SIP Communicator from Ant--> <arg line="--debug"/> diff --git a/lib/accounts.properties.template b/lib/accounts.properties.template index f0277a3..a324e06 100644 --- a/lib/accounts.properties.template +++ b/lib/accounts.properties.template @@ -106,6 +106,10 @@ accounts.sip.account2.PROXY_ADDRESS= # (Optional) accounts.sip.account2.PROXY_PORT= +# This will be the contact list which we will use to test persistent storing +# of sip protocol +accounts.sip.CONTACT_LIST= + # JABBER PROPERTIES # JABBER ACCOUNT 1 diff --git a/lib/felix.unit.test.properties b/lib/felix.unit.test.properties index e78e770..f8da6c9 100644 --- a/lib/felix.unit.test.properties +++ b/lib/felix.unit.test.properties @@ -45,7 +45,6 @@ org.osgi.framework.system.packages.extra= org.osgi.framework; ; version=1.3.0, \ org.jdesktop.jdic.tray; \ org.jdesktop.jdic.desktop; \ com.apple.cocoa.application; \ - net.java.sip.communicator.service.audionotifier; \ javax.crypto; \ javax.crypto.spec; \ javax.crypto.interfaces; \ diff --git a/lib/testing.properties b/lib/testing.properties index ecba6c9..cfc699d 100644 --- a/lib/testing.properties +++ b/lib/testing.properties @@ -23,6 +23,7 @@ net.java.sip.communicator.slick.runner.TEST_LIST=ConfigurationServiceLick \ MsnProtocolProviderSlick \ GibberishProtocolProviderServiceLick \ RssProtocolProviderServiceLick \ + SipProtocolProviderServiceLick \ PopupMessageHandlerSLick # Note that NetworkAddressManagerServiceLick currently runs @@ -36,7 +37,6 @@ net.java.sip.communicator.slick.runner.TEST_LIST=ConfigurationServiceLick \ # # MediaServiceLick because one of the 2 tests fails. # -# SipProtocolProviderServiceLick because fourteen of 25 tests fail. # # GenericProtocolProviderServiceLick because it does not add any tests. # 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 ca58204..02d34de 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetPresenceSipImpl.java @@ -996,6 +996,8 @@ public class OperationSetPresenceSipImpl IllegalStateException, OperationFailedException { + assertConnected(); + if (!(contact instanceof ContactSipImpl)) throw new IllegalArgumentException( @@ -1003,7 +1005,13 @@ public class OperationSetPresenceSipImpl ContactSipImpl sipcontact = (ContactSipImpl) contact; - unsubscribe(sipcontact, true); + /** + * Does not assert if there is no subscription cause if the user + * becomes offline he has terminated the subscription and so we have + * no subscription of this contact but we wont to remove it. + * Does not assert on connected cause have already has made the check. + */ + unsubscribe(sipcontact, false); ((ContactGroupSipImpl) sipcontact.getParentContactGroup()) .removeContact(sipcontact); 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 0c3775b..c278d0c 100644 --- a/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java +++ b/test/net/java/sip/communicator/slick/protocol/sip/SipProtocolProviderServiceLick.java @@ -47,7 +47,7 @@ public class SipProtocolProviderServiceLick * contains the contact list that. */ public static final String CONTACT_LIST_PROPERTY_NAME - = "accounts.gibberish.CONTACT_LIST"; + = "accounts.sip.CONTACT_LIST"; /** * Initializes and registers all tests that we'll run as a part of this |