@@ -19,15 +19,16 @@ describe('preload', () => {
1919 let repo
2020
2121 before ( function ( done ) {
22- this . timeout ( 20 * 1000 )
22+ this . timeout ( 50 * 1000 )
2323
2424 repo = createTempRepo ( )
2525 ipfs = new IPFS ( {
2626 repo,
2727 config : {
2828 Addresses : {
2929 Swarm : [ ]
30- }
30+ } ,
31+ Bootstrap : [ ]
3132 } ,
3233 preload : {
3334 enabled : true ,
@@ -44,25 +45,25 @@ describe('preload', () => {
4445 } )
4546
4647 after ( function ( done ) {
47- this . timeout ( 20 * 1000 )
48+ this . timeout ( 50 * 1000 )
4849 ipfs . stop ( done )
4950 } )
5051
5152 after ( function ( done ) {
52- this . timeout ( 20 * 1000 )
53+ this . timeout ( 50 * 1000 )
5354 repo . teardown ( done )
5455 } )
5556
5657 it ( 'should preload content added with add' , function ( done ) {
57- this . timeout ( 20 * 1000 )
58+ this . timeout ( 50 * 1000 )
5859 ipfs . add ( Buffer . from ( hat ( ) ) , ( err , res ) => {
5960 expect ( err ) . to . not . exist ( )
6061 MockPreloadNode . waitForCids ( res [ 0 ] . hash , done )
6162 } )
6263 } )
6364
6465 it ( 'should preload multiple content added with add' , function ( done ) {
65- this . timeout ( 20 * 1000 )
66+ this . timeout ( 50 * 1000 )
6667 ipfs . add ( [ {
6768 content : Buffer . from ( hat ( ) )
6869 } , {
@@ -76,7 +77,7 @@ describe('preload', () => {
7677 } )
7778
7879 it ( 'should preload multiple content and intermediate dirs added with add' , function ( done ) {
79- this . timeout ( 20 * 1000 )
80+ this . timeout ( 50 * 1000 )
8081 ipfs . add ( [ {
8182 path : 'dir0/dir1/file0' ,
8283 content : Buffer . from ( hat ( ) )
@@ -97,7 +98,7 @@ describe('preload', () => {
9798 } )
9899
99100 it ( 'should preload multiple content and wrapping dir for content added with add and wrapWithDirectory option' , function ( done ) {
100- this . timeout ( 20 * 1000 )
101+ this . timeout ( 50 * 1000 )
101102 ipfs . add ( [ {
102103 path : 'dir0/dir1/file0' ,
103104 content : Buffer . from ( hat ( ) )
@@ -118,7 +119,7 @@ describe('preload', () => {
118119 } )
119120
120121 it ( 'should preload content retrieved with cat' , function ( done ) {
121- this . timeout ( 20 * 1000 )
122+ this . timeout ( 50 * 1000 )
122123 ipfs . add ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , res ) => {
123124 expect ( err ) . to . not . exist ( )
124125 ipfs . cat ( res [ 0 ] . hash , ( err ) => {
@@ -129,7 +130,7 @@ describe('preload', () => {
129130 } )
130131
131132 it ( 'should preload content retrieved with get' , function ( done ) {
132- this . timeout ( 20 * 1000 )
133+ this . timeout ( 50 * 1000 )
133134 ipfs . add ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , res ) => {
134135 expect ( err ) . to . not . exist ( )
135136 ipfs . get ( res [ 0 ] . hash , ( err ) => {
@@ -140,7 +141,7 @@ describe('preload', () => {
140141 } )
141142
142143 it ( 'should preload content retrieved with ls' , function ( done ) {
143- this . timeout ( 20 * 1000 )
144+ this . timeout ( 50 * 1000 )
144145 ipfs . add ( [ {
145146 path : 'dir0/dir1/file0' ,
146147 content : Buffer . from ( hat ( ) )
@@ -169,23 +170,23 @@ describe('preload', () => {
169170 } )
170171
171172 it ( 'should preload content added with object.new' , function ( done ) {
172- this . timeout ( 20 * 1000 )
173+ this . timeout ( 50 * 1000 )
173174 ipfs . object . new ( ( err , cid ) => {
174175 expect ( err ) . to . not . exist ( )
175176 MockPreloadNode . waitForCids ( cid . toBaseEncodedString ( ) , done )
176177 } )
177178 } )
178179
179180 it ( 'should preload content added with object.put' , function ( done ) {
180- this . timeout ( 20 * 1000 )
181+ this . timeout ( 50 * 1000 )
181182 ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
182183 expect ( err ) . to . not . exist ( )
183184 MockPreloadNode . waitForCids ( cid . toBaseEncodedString ( ) , done )
184185 } )
185186 } )
186187
187188 it ( 'should preload content added with object.patch.addLink' , function ( done ) {
188- this . timeout ( 20 * 1000 )
189+ this . timeout ( 50 * 1000 )
189190 parallel ( {
190191 parent : ( cb ) => {
191192 waterfall ( [
@@ -214,7 +215,7 @@ describe('preload', () => {
214215 } )
215216
216217 it ( 'should preload content added with object.patch.rmLink' , function ( done ) {
217- this . timeout ( 20 * 1000 )
218+ this . timeout ( 50 * 1000 )
218219 waterfall ( [
219220 ( cb ) => ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , cb ) ,
220221 ( cid , cb ) => ipfs . object . get ( cid , ( err , node ) => cb ( err , { node, cid } ) ) ,
@@ -239,7 +240,7 @@ describe('preload', () => {
239240 } )
240241
241242 it ( 'should preload content added with object.patch.setData' , function ( done ) {
242- this . timeout ( 20 * 1000 )
243+ this . timeout ( 50 * 1000 )
243244 ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
244245 expect ( err ) . to . not . exist ( )
245246
@@ -251,7 +252,7 @@ describe('preload', () => {
251252 } )
252253
253254 it ( 'should preload content added with object.patch.appendData' , function ( done ) {
254- this . timeout ( 20 * 1000 )
255+ this . timeout ( 50 * 1000 )
255256 ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
256257 expect ( err ) . to . not . exist ( )
257258
@@ -263,7 +264,7 @@ describe('preload', () => {
263264 } )
264265
265266 it ( 'should preload content retrieved with object.get' , function ( done ) {
266- this . timeout ( 20 * 1000 )
267+ this . timeout ( 50 * 1000 )
267268 ipfs . object . new ( null , { preload : false } , ( err , cid ) => {
268269 expect ( err ) . to . not . exist ( )
269270
@@ -275,15 +276,15 @@ describe('preload', () => {
275276 } )
276277
277278 it ( 'should preload content added with block.put' , function ( done ) {
278- this . timeout ( 20 * 1000 )
279+ this . timeout ( 50 * 1000 )
279280 ipfs . block . put ( Buffer . from ( hat ( ) ) , ( err , block ) => {
280281 expect ( err ) . to . not . exist ( )
281282 MockPreloadNode . waitForCids ( block . cid . toBaseEncodedString ( ) , done )
282283 } )
283284 } )
284285
285286 it ( 'should preload content retrieved with block.get' , function ( done ) {
286- this . timeout ( 20 * 1000 )
287+ this . timeout ( 50 * 1000 )
287288 ipfs . block . put ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , block ) => {
288289 expect ( err ) . to . not . exist ( )
289290 ipfs . block . get ( block . cid , ( err ) => {
@@ -294,7 +295,7 @@ describe('preload', () => {
294295 } )
295296
296297 it ( 'should preload content retrieved with block.stat' , function ( done ) {
297- this . timeout ( 20 * 1000 )
298+ this . timeout ( 50 * 1000 )
298299 ipfs . block . put ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , block ) => {
299300 expect ( err ) . to . not . exist ( )
300301 ipfs . block . stat ( block . cid , ( err ) => {
@@ -305,7 +306,7 @@ describe('preload', () => {
305306 } )
306307
307308 it ( 'should preload content added with dag.put' , function ( done ) {
308- this . timeout ( 20 * 1000 )
309+ this . timeout ( 50 * 1000 )
309310 const obj = { test : hat ( ) }
310311 ipfs . dag . put ( obj , { format : 'dag-cbor' , hashAlg : 'sha2-256' } , ( err , cid ) => {
311312 expect ( err ) . to . not . exist ( )
@@ -314,7 +315,7 @@ describe('preload', () => {
314315 } )
315316
316317 it ( 'should preload content retrieved with dag.get' , function ( done ) {
317- this . timeout ( 20 * 1000 )
318+ this . timeout ( 50 * 1000 )
318319 const obj = { test : hat ( ) }
319320 const opts = { format : 'dag-cbor' , hashAlg : 'sha2-256' , preload : false }
320321 ipfs . dag . put ( obj , opts , ( err , cid ) => {
@@ -328,7 +329,7 @@ describe('preload', () => {
328329} )
329330
330331describe ( 'preload disabled' , function ( ) {
331- this . timeout ( 20 * 1000 )
332+ this . timeout ( 50 * 1000 )
332333 let ipfs
333334 let repo
334335
0 commit comments