Integration testing Spring Boot applicationss that use Rqueue #131
Closed
TomMarquardt1
started this conversation in
General
Replies: 1 comment
-
I've written many test cases you can find in this repo. What about using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to write some acceptance tests for my Spring Boot application that use Rqueue to queue a message (to Redis). As part of the programmatic build up of my spring context for running the tests, I am spinning up an embedded Redis as part of the initialization. The problem I have having with Rqueue is the auto-configuration seems to be loading Rqueue before my embedded Redis is loaded. Therefore, there is an error:
Error creating bean with name 'rqueueConfig' defined in class path resource [com/github/sonus21/rqueue/spring/boot/RqueueListenerAutoConfig.class]
because of a RedisConnectionException.
I am not having problems with other beans that use Redis, because it seems that those beans don't try to connect to Redis as part of their initialization. I'm trying to fix this by manipulating the spring configs so that the Rqueue dependent beans get loaded AFTER the embedded Redis is created. BUT, I have to ask. Is there a way to configure Rqueue so that it doesn't try to connect to Redis as a condition of initializing the beans?
Thanks,
Tom
Beta Was this translation helpful? Give feedback.
All reactions