@@ -18,13 +18,16 @@ import (
18
18
19
19
func TestAsyncLoadInitialLoadSucceedsLocallyPresent (t * testing.T ) {
20
20
ctx := context .Background ()
21
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
21
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
22
22
defer cancel ()
23
23
callCount := 0
24
24
blockStore := make (map [ipld.Link ][]byte )
25
25
loader , storer := testutil .NewTestStore (blockStore )
26
26
block := testutil .GenerateBlocksOfSize (1 , 100 )[0 ]
27
27
writer , commit , err := storer (ipld.LinkContext {})
28
+ if err != nil {
29
+ t .Fatal ("should be able to store" )
30
+ }
28
31
_ , err = writer .Write (block .RawData ())
29
32
if err != nil {
30
33
t .Fatal ("could not seed block store" )
@@ -65,7 +68,7 @@ func TestAsyncLoadInitialLoadSucceedsLocallyPresent(t *testing.T) {
65
68
66
69
func TestAsyncLoadInitialLoadSucceedsResponsePresent (t * testing.T ) {
67
70
ctx := context .Background ()
68
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
71
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
69
72
defer cancel ()
70
73
callCount := 0
71
74
blockStore := make (map [ipld.Link ][]byte )
@@ -118,7 +121,7 @@ func TestAsyncLoadInitialLoadSucceedsResponsePresent(t *testing.T) {
118
121
119
122
func TestAsyncLoadInitialLoadFails (t * testing.T ) {
120
123
ctx := context .Background ()
121
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
124
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
122
125
defer cancel ()
123
126
callCount := 0
124
127
blockStore := make (map [ipld.Link ][]byte )
@@ -166,7 +169,7 @@ func TestAsyncLoadInitialLoadFails(t *testing.T) {
166
169
167
170
func TestAsyncLoadInitialLoadIndeterminateWhenRequestNotInProgress (t * testing.T ) {
168
171
ctx := context .Background ()
169
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
172
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
170
173
defer cancel ()
171
174
callCount := 0
172
175
blockStore := make (map [ipld.Link ][]byte )
@@ -203,7 +206,7 @@ func TestAsyncLoadInitialLoadIndeterminateWhenRequestNotInProgress(t *testing.T)
203
206
204
207
func TestAsyncLoadInitialLoadIndeterminateThenSucceeds (t * testing.T ) {
205
208
ctx := context .Background ()
206
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
209
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
207
210
defer cancel ()
208
211
callCount := 0
209
212
blockStore := make (map [ipld.Link ][]byte )
@@ -267,7 +270,7 @@ func TestAsyncLoadInitialLoadIndeterminateThenSucceeds(t *testing.T) {
267
270
268
271
func TestAsyncLoadInitialLoadIndeterminateThenFails (t * testing.T ) {
269
272
ctx := context .Background ()
270
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
273
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
271
274
defer cancel ()
272
275
callCount := 0
273
276
blockStore := make (map [ipld.Link ][]byte )
@@ -324,7 +327,7 @@ func TestAsyncLoadInitialLoadIndeterminateThenFails(t *testing.T) {
324
327
325
328
func TestAsyncLoadInitialLoadIndeterminateThenRequestFinishes (t * testing.T ) {
326
329
ctx := context .Background ()
327
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
330
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
328
331
defer cancel ()
329
332
callCount := 0
330
333
blockStore := make (map [ipld.Link ][]byte )
@@ -373,7 +376,7 @@ func TestAsyncLoadInitialLoadIndeterminateThenRequestFinishes(t *testing.T) {
373
376
374
377
func TestAsyncLoadTwiceLoadsLocallySecondTime (t * testing.T ) {
375
378
ctx := context .Background ()
376
- ctx , cancel := context .WithTimeout (ctx , 10 * time .Millisecond )
379
+ ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
377
380
defer cancel ()
378
381
callCount := 0
379
382
blockStore := make (map [ipld.Link ][]byte )
0 commit comments