File tree 2 files changed +4
-2
lines changed
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 {
234
234
}
235
235
236
236
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 );
238
238
}
239
239
240
240
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 {
404
404
String topic = "topic" + System .nanoTime ();
405
405
Supplier <Object > sub = ipfs .pubsub .sub (topic );
406
406
Object first = sub .get ();
407
+ Assert .assertTrue (first .equals (Collections .emptyMap ()));
407
408
String data = "Hello!" ;
408
409
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 ()));
410
412
}
411
413
412
414
private static String toEscapedHex (byte [] in ) throws IOException {
You can’t perform that action at this time.
0 commit comments