Skip to content

Commit bb159df

Browse files
committed
update tests
1 parent b6bdb36 commit bb159df

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/java/io/ipfs/api/APITest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -629,12 +629,11 @@ public void mountTest() throws IOException {
629629
}
630630

631631
@Test
632-
@Ignore("dht test may hang forever")
633632
public void dhtTest() throws IOException {
634-
Multihash pointer = Multihash.fromBase58("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB");
635-
Map get = ipfs.dht.get(pointer);
636-
Map put = ipfs.dht.put("somekey", "somevalue");
637-
Map findprovs = ipfs.dht.findprovs(pointer);
633+
MerkleNode raw = ipfs.block.put("Mathematics is wonderful".getBytes(), Optional.of("raw"));
634+
// Map get = ipfs.dht.get(raw.hash);
635+
// Map put = ipfs.dht.put("somekey", "somevalue");
636+
List<Map<String, Object>> findprovs = ipfs.dht.findprovs(raw.hash);
638637
List<Peer> peers = ipfs.swarm.peers();
639638
Map query = ipfs.dht.query(peers.get(0).id);
640639
Map find = ipfs.dht.findpeer(peers.get(0).id);
@@ -703,7 +702,8 @@ public void bootstrapTest() throws IOException {
703702
@Test
704703
public void diagTest() throws IOException {
705704
Map config = ipfs.config.show();
706-
String val = ipfs.config.get("Datastore.GCPeriod");
705+
Object mdns = ipfs.config.get("Discovery.MDNS.Interval");
706+
Object val = ipfs.config.get("Datastore.GCPeriod");
707707
Map setResult = ipfs.config.set("Datastore.GCPeriod", val);
708708
ipfs.config.replace(new NamedStreamable.ByteArrayWrapper(JSONParser.toString(config).getBytes()));
709709
// Object log = ipfs.log();

0 commit comments

Comments
 (0)