Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-02-06 09:12:31 -0500
committermkuppe2008-02-06 09:12:31 -0500
commit435a8504ed1763748441bd000bf84af997411ae7 (patch)
treed5c00388bba37a3f04b0dd2d2ae92214a8455bd9 /tests/bundles/org.eclipse.ecf.tests.provider.jslp
parent38f95cf5f55cb47b3351674b6cb6575d40638466 (diff)
downloadorg.eclipse.ecf-435a8504ed1763748441bd000bf84af997411ae7.tar.gz
org.eclipse.ecf-435a8504ed1763748441bd000bf84af997411ae7.tar.xz
org.eclipse.ecf-435a8504ed1763748441bd000bf84af997411ae7.zip
NEW - bug 217971: [Discovery][jSLP] Tests may warn about their preconditions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217971
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests.provider.jslp')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java16
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/tracing20
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
index bbdb1e64e..6c21c3dbc 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
@@ -15,10 +15,26 @@ import org.eclipse.ecf.tests.discovery.DiscoveryTest;
public class JSLPDiscoveryTest extends DiscoveryTest {
+ static {
+ // we need SA functionality
+ assertFalse("jSLP tests require net.slp.uaonly to be set to false because they need SA functionality.", new Boolean(System.getProperty("net.slp.uaonly")).booleanValue());
+ // tests need root privileges to bind to slp port 427 in SA mode
+ int port;
+ try {
+ port = Integer.parseInt(System.getProperty("net.slp.port", "427"));
+ } catch (NumberFormatException e) {
+ port = 427;
+ }
+ if(port <= 1024) {
+ System.err.println("jSLP tests require root privileges to bind to port 427 (Alternatively the port can be set to a high port via -Dnet.slp.port=theHighPort");
+ }
+ }
+
public JSLPDiscoveryTest() {
super(JSLPDiscoveryContainer.NAME, JSLPDiscoveryContainer.REDISCOVER, new JSLPTestComparator());
}
+
public void testJSLPLocatorNull() {
//Activator.getDefault().getLocator() == null always
fail("not yet implemented");
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/tracing b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/tracing
new file mode 100755
index 000000000..b3aed4c26
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/tracing
@@ -0,0 +1,20 @@
+#
+# org.eclipse.ecf.provider.discovery
+#
+org.eclipse.ecf.provider.discovery/debug=true
+org.eclipse.ecf.provider.discovery/debug/methods/entering=true
+org.eclipse.ecf.provider.discovery/debug/methods/exiting=true
+org.eclipse.ecf.provider.discovery/debug/methods/tracing=true
+org.eclipse.ecf.provider.discovery/debug/methods/catching=true
+org.eclipse.ecf.provider.discovery/debug/methods/throwing=true
+org.eclipse.ecf.provider.discovery/debug/methods/changing=true
+#
+# org.eclipse.ecf.provider.jslp
+#
+org.eclipse.ecf.provider.jslp/debug=true
+org.eclipse.ecf.provider.jslp/debug/methods/entering=true
+org.eclipse.ecf.provider.jslp/debug/methods/exiting=true
+org.eclipse.ecf.provider.jslp/debug/methods/tracing=true
+org.eclipse.ecf.provider.jslp/debug/methods/catching=true
+org.eclipse.ecf.provider.jslp/debug/methods/throwing=true
+org.eclipse.ecf.provider.jslp/debug/methods/changing=true

Back to the top