Open hughesjj opened 3 months ago
@hughesjj I also want to write a test for redis cluster using testcontainers but it is failing. Please let me know if you make any progress!!
I did an example using Testcontainers for Java in the past. See SO https://stackoverflow.com/questions/74822259/testcontainers-jedisconnectionexception-could-not-get-a-resource-from-the-pool/75251597#75251597
@hughesjj Since you shared already your tests that utilizes a Redis cluster setup, would you like to contribute it?
@mdelapenya Should such an example go into the tests, or do we also have a plan for dedicated example modules within tc-go?
For examples, I usually suggest using the testable example pattern, in the examples_test.go
file.
Proposal
I'm a maintainer of
opentelemetry-collector-contrib/receiver/redis
, and have attempted to implement testing a redis cluster. This is important as some metrics only appear (ctrl+fIf the instance is a replica
) when a redis is configured as a cluster.While we have good examples for creating a single redis container, it would be nice to do so as well for clusters. It seems like I'm not alone in this desire, as someone had previously tried the same
I'll note that this line of desire would also apply to kafka, and pretty much every open source distributed service.