Skip to content

Commit 3749171

Browse files
committed
Fixed unix file test
1 parent c1e83f8 commit 3749171

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/test/java/org/ipfs/api/Test.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,15 @@ public void blockTest() {
226226
}
227227

228228
@org.junit.Test
229-
public void fileTest() {
229+
public void fileContentsTest() {
230230
try {
231231
ipfs.repo.gc();
232232
List<Multihash> local = ipfs.refs.local();
233233
for (Multihash hash: local) {
234-
Map ls = ipfs.file.ls(hash);
234+
try {
235+
Map ls = ipfs.file.ls(hash);
236+
return;
237+
} catch (Exception e) {} // non unixfs files will throw an exception here
235238
}
236239
} catch (IOException e) {
237240
throw new RuntimeException(e);

0 commit comments

Comments
 (0)