File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ func TestRedisCounter(t *testing.T) {
15
15
limitCounter , err := httprateredis .NewRedisLimitCounter (& httprateredis.Config {
16
16
Host : "localhost" ,
17
17
Port : 6379 ,
18
- MaxIdle : 100 ,
19
- MaxActive : 200 ,
18
+ MaxIdle : 0 ,
19
+ MaxActive : 2 ,
20
20
DBIndex : 0 ,
21
21
ClientName : "httprateredis_test" ,
22
22
PrefixKey : fmt .Sprintf ("httprate:test:%v" , rand .Int31n (100000 )), // Unique Redis key for each test
@@ -162,7 +162,10 @@ func BenchmarkLocalCounter(b *testing.B) {
162
162
DBIndex : 0 ,
163
163
ClientName : "httprateredis_test" ,
164
164
PrefixKey : fmt .Sprintf ("httprate:test:%v" , rand .Int31n (100000 )), // Unique key for each test
165
+ MaxActive : 25 ,
166
+ MaxIdle : 0 ,
165
167
FallbackDisabled : true ,
168
+ FallbackTimeout : 5 * time .Second ,
166
169
})
167
170
if err != nil {
168
171
b .Fatalf ("redis not available: %v" , err )
You can’t perform that action at this time.
0 commit comments