redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
20.2k stars 2.38k forks source link

Flaky withConn Tests in internal_test.go #3165

Open Parvezkhan0 opened 1 month ago

Parvezkhan0 commented 1 month ago

I observed that the withConn tests in internal_test.go often fail due to connection errors. Interestingly, they tend to pass in the CI environment.

Details:

The tests are designed to establish a connection to Redis at 127.0.0.1:6379, but the test setup does not initiate a Redis server. In the CI pipeline, these tests succeed because another Redis instance is running for a different test case.

Additionally, it's worth noting that these withConn tests are located within the Redis package, rather than in redis_test, where the BeforeSuite function initializes Redis.