summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorMatthew Johnson <mjj29@qadesh.matthew.ath.cx>2009-03-25 23:06:43 +0000
committerMatthew Johnson <mjj29@qadesh.matthew.ath.cx>2009-03-25 23:06:43 +0000
commit8c9d9f8e2eaf7c71f7a53f083931dfe7fe0ca42a (patch)
tree1ba4ba0a1828bcd8508275f6e855b135ae512282 /org
parente0e799d7a4f7bc929adc342011b653f06a72d0b3 (diff)
make tests more robust
Diffstat (limited to 'org')
-rw-r--r--org/freedesktop/dbus/test/test.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/org/freedesktop/dbus/test/test.java b/org/freedesktop/dbus/test/test.java
index 2a8444e..0ade1e6 100644
--- a/org/freedesktop/dbus/test/test.java
+++ b/org/freedesktop/dbus/test/test.java
@@ -546,7 +546,13 @@ public class test
fail("Introspection data invalid");
System.out.println("Got Introspection Data: \n"+data);
- System.out.println("Pinging ourselves");
+ // setup bus name set
+ Set<String> peers = serverconn.new PeerSet();
+ peers.add("org.freedesktop.DBus");
+ clientconn.requestBusName("test.testclient");
+ peers.add("test.testclient");
+
+ System.out.println("Pinging ourselves");
/** Call ping. */
for (int i = 0; i < 10; i++) {
long then = System.currentTimeMillis();
@@ -817,6 +823,8 @@ public class test
test.fail("Failed to check nested lists");
System.out.println("done");
+ clientconn.releaseBusName("test.testclient");
+
System.out.print("Testing dynamic object creation...");
TestNewInterface tni = tri2.getNew();
System.out.print(tni.getName()+" ");
@@ -825,13 +833,6 @@ public class test
/* send an object in a signal */
serverconn.sendSignal(new TestSignalInterface.TestObjectSignal("/foo/bar/Wibble", tclass));
- // setup bus name set
- Set<String> peers = serverconn.new PeerSet();
- peers.add("org.freedesktop.DBus");
- clientconn.requestBusName("test.testclient");
- peers.add("test.testclient");
- clientconn.releaseBusName("test.testclient");
-
/** Pause while we wait for the DBus messages to go back and forth. */
Thread.sleep(1000);