diff options
author | Matthew Johnson <mjj29@qadesh.matthew.ath.cx> | 2009-03-25 23:06:43 +0000 |
---|---|---|
committer | Matthew Johnson <mjj29@qadesh.matthew.ath.cx> | 2009-03-25 23:06:43 +0000 |
commit | 8c9d9f8e2eaf7c71f7a53f083931dfe7fe0ca42a (patch) | |
tree | 1ba4ba0a1828bcd8508275f6e855b135ae512282 /org | |
parent | e0e799d7a4f7bc929adc342011b653f06a72d0b3 (diff) |
make tests more robust
Diffstat (limited to 'org')
-rw-r--r-- | org/freedesktop/dbus/test/test.java | 17 |
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); |