@@ -166,15 +166,17 @@ public void directoryTest() throws IOException {
166166 throw new IllegalStateException ("Different contents!" );
167167 }
168168
169- // @Test
169+ @ Ignore
170+ @ Test
170171 public void largeFileTest () throws IOException {
171172 byte [] largerData = new byte [100 *1024 *1024 ];
172173 new Random (1 ).nextBytes (largerData );
173174 NamedStreamable .ByteArrayWrapper largeFile = new NamedStreamable .ByteArrayWrapper ("nontrivial.txt" , largerData );
174175 fileTest (largeFile );
175176 }
176177
177- // @Test
178+ @ Ignore
179+ @ Test
178180 public void hugeFileStreamTest () throws IOException {
179181 byte [] hugeData = new byte [1000 *1024 *1024 ];
180182 new Random (1 ).nextBytes (hugeData );
@@ -460,8 +462,8 @@ public void objectTest() throws IOException {
460462 MerkleNode _new = ipfs .object ._new (Optional .empty ());
461463 Multihash pointer = Multihash .fromBase58 ("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" );
462464 MerkleNode object = ipfs .object .get (pointer );
463- List <MerkleNode > newPointer = ipfs .object .put (Arrays . asList (object .toJSONString ().getBytes ()));
464- List <MerkleNode > newPointer2 = ipfs .object .put ("json" , Arrays . asList (object .toJSONString ().getBytes ()));
465+ List <MerkleNode > newPointer = ipfs .object .put (Collections . singletonList (object .toJSONString ().getBytes ()));
466+ List <MerkleNode > newPointer2 = ipfs .object .put ("json" , Collections . singletonList (object .toJSONString ().getBytes ()));
465467 MerkleNode links = ipfs .object .links (pointer );
466468 byte [] data = ipfs .object .data (pointer );
467469 Map stat = ipfs .object .stat (pointer );
@@ -472,7 +474,7 @@ public void blockTest() throws IOException {
472474 MerkleNode pointer = new MerkleNode ("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" );
473475 Map stat = ipfs .block .stat (pointer .hash );
474476 byte [] object = ipfs .block .get (pointer .hash );
475- List <MerkleNode > newPointer = ipfs .block .put (Arrays . asList ("Some random data..." .getBytes ()));
477+ List <MerkleNode > newPointer = ipfs .block .put (Collections . singletonList ("Some random data..." .getBytes ()));
476478 }
477479
478480 @ Test
@@ -556,15 +558,15 @@ public void merkleLinkInMap() throws IOException {
556558 Random r = new Random ();
557559 CborObject .CborByteArray target = new CborObject .CborByteArray (("g'day IPFS!" ).getBytes ());
558560 byte [] rawTarget = target .toByteArray ();
559- MerkleNode targetRes = ipfs .block .put (Arrays . asList (rawTarget ), Optional .of ("cbor" )).get (0 );
561+ MerkleNode targetRes = ipfs .block .put (Collections . singletonList (rawTarget ), Optional .of ("cbor" )).get (0 );
560562
561563 CborObject .CborMerkleLink link = new CborObject .CborMerkleLink (targetRes .hash );
562564 Map <String , CborObject > m = new TreeMap <>();
563565 m .put ("alink" , link );
564566 m .put ("arr" , new CborObject .CborList (Collections .emptyList ()));
565567 CborObject .CborMap source = CborObject .CborMap .build (m );
566568 byte [] rawSource = source .toByteArray ();
567- MerkleNode sourceRes = ipfs .block .put (Arrays . asList (rawSource ), Optional .of ("cbor" )).get (0 );
569+ MerkleNode sourceRes = ipfs .block .put (Collections . singletonList (rawSource ), Optional .of ("cbor" )).get (0 );
568570
569571 CborObject .fromByteArray (rawSource );
570572
@@ -587,23 +589,23 @@ public void merkleLinkInMap() throws IOException {
587589 public void recursiveRefs () throws IOException {
588590 CborObject .CborByteArray leaf1 = new CborObject .CborByteArray (("G'day IPFS!" ).getBytes ());
589591 byte [] rawLeaf1 = leaf1 .toByteArray ();
590- MerkleNode leaf1Res = ipfs .block .put (Arrays . asList (rawLeaf1 ), Optional .of ("cbor" )).get (0 );
592+ MerkleNode leaf1Res = ipfs .block .put (Collections . singletonList (rawLeaf1 ), Optional .of ("cbor" )).get (0 );
591593
592594 CborObject .CborMerkleLink link = new CborObject .CborMerkleLink (leaf1Res .hash );
593595 Map <String , CborObject > m = new TreeMap <>();
594596 m .put ("link1" , link );
595597 CborObject .CborMap source = CborObject .CborMap .build (m );
596- MerkleNode sourceRes = ipfs .block .put (Arrays . asList (source .toByteArray ()), Optional .of ("cbor" )).get (0 );
598+ MerkleNode sourceRes = ipfs .block .put (Collections . singletonList (source .toByteArray ()), Optional .of ("cbor" )).get (0 );
597599
598600 CborObject .CborByteArray leaf2 = new CborObject .CborByteArray (("G'day again, IPFS!" ).getBytes ());
599601 byte [] rawLeaf2 = leaf2 .toByteArray ();
600- MerkleNode leaf2Res = ipfs .block .put (Arrays . asList (rawLeaf2 ), Optional .of ("cbor" )).get (0 );
602+ MerkleNode leaf2Res = ipfs .block .put (Collections . singletonList (rawLeaf2 ), Optional .of ("cbor" )).get (0 );
601603
602604 Map <String , CborObject > m2 = new TreeMap <>();
603605 m2 .put ("link1" , new CborObject .CborMerkleLink (sourceRes .hash ));
604606 m2 .put ("link2" , new CborObject .CborMerkleLink (leaf2Res .hash ));
605607 CborObject .CborMap source2 = CborObject .CborMap .build (m2 );
606- MerkleNode rootRes = ipfs .block .put (Arrays . asList (source2 .toByteArray ()), Optional .of ("cbor" )).get (0 );
608+ MerkleNode rootRes = ipfs .block .put (Collections . singletonList (source2 .toByteArray ()), Optional .of ("cbor" )).get (0 );
607609
608610 List <Multihash > refs = ipfs .refs (rootRes .hash , false );
609611 boolean correct = refs .contains (sourceRes .hash ) && refs .contains (leaf2Res .hash ) && refs .size () == 2 ;
@@ -625,14 +627,14 @@ public void rootMerkleLink() throws IOException {
625627 Random r = new Random ();
626628 CborObject .CborByteArray target = new CborObject .CborByteArray (("g'day IPFS!" + r .nextInt ()).getBytes ());
627629 byte [] rawTarget = target .toByteArray ();
628- MerkleNode block1 = ipfs .block .put (Arrays . asList (rawTarget ), Optional .of ("cbor" )).get (0 );
630+ MerkleNode block1 = ipfs .block .put (Collections . singletonList (rawTarget ), Optional .of ("cbor" )).get (0 );
629631 Multihash block1Hash = block1 .hash ;
630632 byte [] retrievedObj1 = ipfs .block .get (block1Hash );
631633 Assert .assertTrue ("get inverse of put" , Arrays .equals (retrievedObj1 , rawTarget ));
632634
633635 CborObject .CborMerkleLink cbor2 = new CborObject .CborMerkleLink (block1 .hash );
634636 byte [] obj2 = cbor2 .toByteArray ();
635- MerkleNode block2 = ipfs .block .put (Arrays . asList (obj2 ), Optional .of ("cbor" )).get (0 );
637+ MerkleNode block2 = ipfs .block .put (Collections . singletonList (obj2 ), Optional .of ("cbor" )).get (0 );
636638 byte [] retrievedObj2 = ipfs .block .get (block2 .hash );
637639 Assert .assertTrue ("get inverse of put" , Arrays .equals (retrievedObj2 , obj2 ));
638640
@@ -655,7 +657,7 @@ public void rootMerkleLink() throws IOException {
655657 public void rootNull () throws IOException {
656658 CborObject .CborNull cbor = new CborObject .CborNull ();
657659 byte [] obj = cbor .toByteArray ();
658- MerkleNode block = ipfs .block .put (Arrays . asList (obj ), Optional .of ("cbor" )).get (0 );
660+ MerkleNode block = ipfs .block .put (Collections . singletonList (obj ), Optional .of ("cbor" )).get (0 );
659661 byte [] retrievedObj = ipfs .block .get (block .hash );
660662 Assert .assertTrue ("get inverse of put" , Arrays .equals (retrievedObj , obj ));
661663
@@ -676,12 +678,12 @@ public void merkleLinkInList() throws IOException {
676678 Random r = new Random ();
677679 CborObject .CborByteArray target = new CborObject .CborByteArray (("g'day IPFS!" + r .nextInt ()).getBytes ());
678680 byte [] rawTarget = target .toByteArray ();
679- MerkleNode targetRes = ipfs .block .put (Arrays . asList (rawTarget ), Optional .of ("cbor" )).get (0 );
681+ MerkleNode targetRes = ipfs .block .put (Collections . singletonList (rawTarget ), Optional .of ("cbor" )).get (0 );
680682
681683 CborObject .CborMerkleLink link = new CborObject .CborMerkleLink (targetRes .hash );
682- CborObject .CborList source = new CborObject .CborList (Arrays . asList (link ));
684+ CborObject .CborList source = new CborObject .CborList (Collections . singletonList (link ));
683685 byte [] rawSource = source .toByteArray ();
684- MerkleNode sourceRes = ipfs .block .put (Arrays . asList (rawSource ), Optional .of ("cbor" )).get (0 );
686+ MerkleNode sourceRes = ipfs .block .put (Collections . singletonList (rawSource ), Optional .of ("cbor" )).get (0 );
685687
686688 List <Multihash > add = ipfs .pin .add (sourceRes .hash );
687689 ipfs .repo .gc ();
@@ -930,7 +932,8 @@ public void addArgsTest() {
930932 Assert .assertTrue ("args toQueryString() format" , queryStr .equals ("inline=true&cid-version=1" ));
931933 }
932934
933- // this api is disabled until deployment over IPFS is enabled
935+ @ Ignore ("This api is disabled until deployment over IPFS is enabled" )
936+ @ Test
934937 public void updateTest () throws IOException {
935938 Object check = ipfs .update .check ();
936939 Object update = ipfs .update ();
0 commit comments