@@ -44,7 +44,7 @@ func TestPermit_Simulation(t *testing.T) {
4444 }{
4545 {
4646 name : "enough permit, no blocking" ,
47- maxTestDuration : 200 * time .Millisecond ,
47+ maxTestDuration : 100 * time .Millisecond ,
4848 capacity : []int {1000 },
4949 goroutines : 100 ,
5050 goroutinesAcquireChan : 100 ,
@@ -60,23 +60,23 @@ func TestPermit_Simulation(t *testing.T) {
6060 },
6161 {
6262 name : "not enough permit for some to acquire, fail some" ,
63- maxTestDuration : 100 * time .Millisecond ,
63+ maxTestDuration : 300 * time .Millisecond ,
6464 capacity : []int {100 },
6565 goroutines : 500 ,
6666 goroutinesAcquireChan : 500 ,
6767 expectFailuresAtLeast : 1 ,
6868 },
6969 {
7070 name : "not enough permit at beginning but due to capacity change, blocking but all acquire" ,
71- maxTestDuration : 100 * time .Second ,
72- capacity : []int {100 , 200 , 300 },
71+ maxTestDuration : 300 * time .Millisecond ,
72+ capacity : []int {100 , 300 , 500 },
7373 goroutines : 500 ,
7474 goroutinesAcquireChan : 500 ,
7575 expectFailures : 0 ,
7676 },
7777 {
7878 name : "not enough permit for any acquire, fail all" ,
79- maxTestDuration : 1 * time .Second ,
79+ maxTestDuration : 300 * time .Millisecond ,
8080 capacity : []int {0 },
8181 goroutines : 1000 ,
8282 expectFailures : 1000 ,
0 commit comments