Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2010-07-18 05:14:01 -0400
committerMarkus Alexander Kuppe2010-07-18 05:14:01 -0400
commitdb4179e2d98e79d71708424f7769e82c7df6bd5a (patch)
tree1afd8aa0b92a259bcca8465c2ae3e20f6ab3b3e4 /tests/bundles/org.eclipse.ecf.tests.provider.dnssd
parent41364653f389fc327d30b293e04dabbdb1e4b062 (diff)
downloadorg.eclipse.ecf-db4179e2d98e79d71708424f7769e82c7df6bd5a.tar.gz
org.eclipse.ecf-db4179e2d98e79d71708424f7769e82c7df6bd5a.tar.xz
org.eclipse.ecf-db4179e2d98e79d71708424f7769e82c7df6bd5a.zip
NEW - bug 314999: [Discovery][DNS-SD] Implement IDiscoveryAdvertiser
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314999 Dyndns without hostkey
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests.provider.dnssd')
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.provider.dnssd/src/org/eclipse/ecf/tests/provider/dnssd/DnsSdAdvertiserServiceTest.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.dnssd/src/org/eclipse/ecf/tests/provider/dnssd/DnsSdAdvertiserServiceTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.dnssd/src/org/eclipse/ecf/tests/provider/dnssd/DnsSdAdvertiserServiceTest.java
index dcd69c02c..f52d614ab 100644
--- a/tests/bundles/org.eclipse.ecf.tests.provider.dnssd/src/org/eclipse/ecf/tests/provider/dnssd/DnsSdAdvertiserServiceTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.dnssd/src/org/eclipse/ecf/tests/provider/dnssd/DnsSdAdvertiserServiceTest.java
@@ -15,8 +15,10 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.ecf.core.ContainerConnectException;
+import org.eclipse.ecf.core.util.ECFRuntimeException;
import org.eclipse.ecf.discovery.IDiscoveryAdvertiser;
import org.eclipse.ecf.discovery.IDiscoveryLocator;
+import org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryAdvertiser;
import org.eclipse.ecf.tests.discovery.AbstractDiscoveryTest;
import org.xbill.DNS.DClass;
import org.xbill.DNS.Message;
@@ -39,6 +41,7 @@ public class DnsSdAdvertiserServiceTest extends AbstractDiscoveryTest {
setServices(new String[]{DnsSdTestHelper.REG_SCHEME});
setProtocol(DnsSdTestHelper.PROTO);
setComparator(new DnsSdAdvertiserComparator());
+ setTTL(DnsSdTestHelper.TTL);
}
/* (non-Javadoc)
@@ -103,9 +106,19 @@ public class DnsSdAdvertiserServiceTest extends AbstractDiscoveryTest {
/**
* Tests that a register is handled correctly when no key is present
* for that domain and the underlying ddns call fails
+ * @throws ContainerConnectException
*/
- public void testRegisterServiceWithoutHostKey() {
- fail("Not yet implemented");
+ public void testRegisterServiceWithoutHostKey() throws ContainerConnectException {
+ final DnsSdDiscoveryAdvertiser advertiser = new DnsSdDiscoveryAdvertiser();
+ advertiser.connect(null, null);
+
+ try {
+ advertiser.registerService(serviceInfo);
+ } catch(ECFRuntimeException e) {
+ advertiser.disconnect();
+ return;
+ }
+ fail("Register should have failed without a host key given.");
}
/* (non-Javadoc)

Back to the top