diff --git a/runtime/src/test/java/org/capnproto/TwoPartyTest.java b/runtime/src/test/java/org/capnproto/TwoPartyTest.java index c57250c..12ea1a6 100644 --- a/runtime/src/test/java/org/capnproto/TwoPartyTest.java +++ b/runtime/src/test/java/org/capnproto/TwoPartyTest.java @@ -104,12 +104,11 @@ public class TwoPartyTest { } @Test - public void testNullCap() { - var server = new TwoPartyServer(new Capability.Client()); - server.listen(serverSocket); + public void testNullCap() throws ExecutionException, InterruptedException { + var server = new TwoPartyRpcSystem(this.serverNetwork, new Capability.Client()); var cap = this.client.bootstrap(); var resolved = cap.whenResolved().toCompletableFuture(); - resolved.join(); + resolved.get(); } @Test @@ -204,6 +203,4 @@ public class TwoPartyTest { var cap2 = results.getResult2(); Assert.assertFalse(cap2.isNull()); } - - } \ No newline at end of file