File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ public Object peers(String topic) throws IOException {
234234 }
235235
236236 public Object pub (String topic , String data ) throws IOException {
237- return retrieveAndParse ("pubsub/peers ?arg=" +topic + "&arg=" + data );
237+ return retrieveAndParse ("pubsub/pub ?arg=" +topic + "&arg=" + data );
238238 }
239239
240240 public Supplier <Object > sub (String topic ) throws IOException {
Original file line number Diff line number Diff line change @@ -404,9 +404,11 @@ public void pubsub() throws IOException {
404404 String topic = "topic" + System .nanoTime ();
405405 Supplier <Object > sub = ipfs .pubsub .sub (topic );
406406 Object first = sub .get ();
407+ Assert .assertTrue (first .equals (Collections .emptyMap ()));
407408 String data = "Hello!" ;
408409 Object pub = ipfs .pubsub .pub (topic , data );
409- Assert .assertTrue (first .equals (Collections .emptyMap ()));
410+ Object second = sub .get ();
411+ Assert .assertTrue ( ! second .equals (Collections .emptyMap ()));
410412 }
411413
412414 private static String toEscapedHex (byte [] in ) throws IOException {
You can’t perform that action at this time.
0 commit comments