adjust / rmq

Message queue system written in Go and backed by Redis
MIT License
1.57k stars 206 forks source link

34 Add OpenConnectionWithTestRedisClient for more realistic testing #35

Closed wellle closed 6 years ago

wellle commented 6 years ago

This PR continues #34, which wanted to use batch consumers in tests. A new constructor OpenConnectionWithTestRedisClient was added which returns a real queue connection with an in memory test/mock implementation of a redis client.

That way it can be used in integration like tests which test multiple parts of an rmq connection. (While TestConnection and TestDelivery` are intended for more isolated producer and consumer tests respectively.)

/cc @MathieuNls