Skip to content

Commit 8112a9e

Browse files
committed
Github actions don't have very strong redis
1 parent a2a09ff commit 8112a9e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

httprateredis_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ func TestRedisCounter(t *testing.T) {
1515
limitCounter, err := httprateredis.NewRedisLimitCounter(&httprateredis.Config{
1616
Host: "localhost",
1717
Port: 6379,
18-
MaxIdle: 100,
19-
MaxActive: 200,
18+
MaxIdle: 0,
19+
MaxActive: 2,
2020
DBIndex: 0,
2121
ClientName: "httprateredis_test",
2222
PrefixKey: fmt.Sprintf("httprate:test:%v", rand.Int31n(100000)), // Unique Redis key for each test
@@ -162,7 +162,10 @@ func BenchmarkLocalCounter(b *testing.B) {
162162
DBIndex: 0,
163163
ClientName: "httprateredis_test",
164164
PrefixKey: fmt.Sprintf("httprate:test:%v", rand.Int31n(100000)), // Unique key for each test
165+
MaxActive: 25,
166+
MaxIdle: 0,
165167
FallbackDisabled: true,
168+
FallbackTimeout: 5 * time.Second,
166169
})
167170
if err != nil {
168171
b.Fatalf("redis not available: %v", err)

0 commit comments

Comments
 (0)