@@ -53,8 +53,6 @@ func init() {
53
53
}); err != nil {
54
54
panic (err )
55
55
}
56
- queue .MaxConcurrency = 10 // Reduce concurrency to test overloading workers
57
- pinning .PinTimeout = time .Second * 5
58
56
}
59
57
60
58
func TestMain (m * testing.M ) {
@@ -75,6 +73,8 @@ func TestMain(m *testing.M) {
75
73
}
76
74
77
75
func Test_ListPins (t * testing.T ) {
76
+ queue .MaxConcurrency = 10 // Reduce concurrency to test overloading workers
77
+ pinning .PinTimeout = time .Second * 10
78
78
gw := newGateway (t )
79
79
80
80
t .Run ("pagination" , func (t * testing.T ) {
@@ -100,7 +100,7 @@ func Test_ListPins(t *testing.T) {
100
100
i := i
101
101
j := i + (b * batchSize )
102
102
f := files [j ]
103
- time .Sleep (time .Second )
103
+ time .Sleep (time .Second * 2 )
104
104
eg .Go (func () error {
105
105
if gctx .Err () != nil {
106
106
return nil
@@ -115,7 +115,7 @@ func Test_ListPins(t *testing.T) {
115
115
}(c , b )
116
116
}
117
117
118
- time .Sleep (time .Second * 25 ) // Allow time for requests to be added
118
+ time .Sleep (time .Minute ) // Allow time for requests to be added
119
119
120
120
// Test pagination
121
121
for _ , c := range clients {
@@ -294,6 +294,7 @@ func Test_ListPins(t *testing.T) {
294
294
}
295
295
296
296
func Test_AddPin (t * testing.T ) {
297
+ pinning .PinTimeout = time .Second * 5
297
298
gw := newGateway (t )
298
299
c := newClient (t , gw )
299
300
@@ -332,6 +333,7 @@ func Test_AddPin(t *testing.T) {
332
333
}
333
334
334
335
func Test_GetPin (t * testing.T ) {
336
+ pinning .PinTimeout = time .Second * 5
335
337
gw := newGateway (t )
336
338
c := newClient (t , gw )
337
339
@@ -383,6 +385,7 @@ func Test_GetPin(t *testing.T) {
383
385
}
384
386
385
387
func Test_ReplacePin (t * testing.T ) {
388
+ pinning .PinTimeout = time .Second * 5
386
389
gw := newGateway (t )
387
390
c := newClient (t , gw )
388
391
@@ -423,6 +426,7 @@ func Test_ReplacePin(t *testing.T) {
423
426
}
424
427
425
428
func Test_RemovePin (t * testing.T ) {
429
+ pinning .PinTimeout = time .Second * 5
426
430
gw := newGateway (t )
427
431
c := newClient (t , gw )
428
432
0 commit comments