-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue Integration Tests with Redis Cluster #54218
base: 11.x
Are you sure you want to change the base?
Conversation
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
2b8753f
to
22f4a84
Compare
5531f2e
to
de4335b
Compare
@taylorotwell returned to draft. Please, clarify, if i should update something |
Hey @vadimonus - can you let me know how to actually run the tests against Redis Cluster? Please mark as ready for review when answered. |
de38141
to
1e3b8fa
Compare
1e3b8fa
to
8a27681
Compare
@taylorotwell , sorry, lost one file while rebasing. This PR adds new entry to queues.yml. It will create minimal Redis Cluster with 3 nodes and run tests with it (both drivers) Currently Laravel redis config does not allow to switch to redis-cluster only by providing some env. So fixes in InteractsWithRedis.php are made to switch to provide clustered config if REDIS_CLUSTER_HOSTS_AND_PORTS env is set. |
8a27681
to
fd9ca4d
Compare
fd9ca4d
to
c5d4b1e
Compare
Currently Laravel declares some support for Redis Cluster, but some features are not working (for example, job batches).
This PR adds Queue Integration Tests run with Redis Cluster (on both predis and phpredis). This will allow to check if new and existing features are compatible with Redis Cluster.
Some changes were made to run tests in new environment.
cache
to config in InteractsWithRedis, to make configs in trait same as in app, and do not break tests, that previously used app configs. This change may be considered backward incompatible. On the other hand, behaviour of InteractsWithRedis is not described anywhere, and is intended to be used only in tests, and this change may be treated as not breaking contracts.{default}
queue name instead ofqueue
. RedisQueueTest updated, to take queue name from config. This allow to pass right queue name when tested in cluster.