-
Notifications
You must be signed in to change notification settings - Fork 25
Improve deleting site transients #42
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, @ocean90, looking good already!
I've written down a few remarks concerning the algorithm.
Also, I'd like to have the following tests added to the Behat suite as well:
- deleting expired/all transients from site meta
- deleting expired/all transients from multisite
(I notice now that the --expired
is not tested at all, though...)
Another observation: I just saw that you've replaced |
@schlessera After 90af941 three tests will fail because when deleting all transients the count is always one more. It seems to be that during each test WP cron is triggered which means |
@ocean90 Oh, interesting. We should definitely disable cron for the tests, would also reduce the running time as well I guess. |
@ocean90 I made a change to Once this is merged, I'll tag a new release that you can then constrain the Composer file to for this package. |
@schlessera Thanks! I replaced |
@ocean90 Release v2.0.11 of |
@ocean90 I felt the tests had become a bit haphazard now from the multiple changes. I tried to restructure them to make them more consistent and to verify the expectations I would currently have of the logic. With this change, I have the following two failures:
According to my current understanding, this would point to issues with the code, nto the tests, but I might be missing something obvious (it's early in the morning, after all). Can you look into the tests to help me find out whether my expectations or the code are off (we can discuss in Slack if you prefer)? |
…() will delete it
Thanks for the great contribution, @ocean90 ! |
Improve deleting site transients
Fixes #30.
Fixes #41.