File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,19 @@ func TestChannelQueue(t *testing.T) {
26
26
queue , err := NewChannelQueue (handle ,
27
27
ChannelQueueConfiguration {
28
28
WorkerPoolConfiguration : WorkerPoolConfiguration {
29
- QueueLength : 20 ,
29
+ QueueLength : 0 ,
30
30
MaxWorkers : 10 ,
31
31
BlockTimeout : 1 * time .Second ,
32
32
BoostTimeout : 5 * time .Minute ,
33
33
BoostWorkers : 5 ,
34
34
},
35
- Workers : 1 ,
35
+ Workers : 0 ,
36
+ Name : "TestChannelQueue" ,
36
37
}, & testData {})
37
38
assert .NoError (t , err )
38
39
40
+ assert .Equal (t , queue .(* ChannelQueue ).WorkerPool .boostWorkers , 5 )
41
+
39
42
go queue .Run (nilFn , nilFn )
40
43
41
44
test1 := testData {"A" , 1 }
Original file line number Diff line number Diff line change @@ -132,8 +132,8 @@ func (p *WorkerPool) pushBoost(data Data) {
132
132
p .blockTimeout /= 2
133
133
p .lock .Unlock ()
134
134
}()
135
- p .addWorkers (ctx , boost )
136
135
p .lock .Unlock ()
136
+ p .addWorkers (ctx , boost )
137
137
p .dataChan <- data
138
138
}
139
139
}
You can’t perform that action at this time.
0 commit comments