Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2024 at 19:50 UTC
Updated:
17 Dec 2024 at 13:44 UTC
Jump to comment: Most recent
Comments
Comment #2
avpadernoComment #3
avpadernoComment #4
avpaderno(This is a bug, even if minor.)
Comment #5
avpadernoComment #7
avpadernoNot even Drupal 6.x nor Drupal 5.x uses such value. I was thinking of left-over code from previous versions, but it is not so.
Comment #8
poker10 commentedThanks for reporting and working on this.
I did some search and found out that the changes in test were committed in #333171: Optimize the field cache. If we read the discussion in that issue, we can see that it was proposed to add the new variable
cache_clear_thresholdand it was in patch in #18. But then it was removed, but was left in the test (seems like unintentionally). So I agree we can remove this safely.I think there is one question left here - do we need the rest of the test, or can we delete all other line from
cache_clear_thresholdto the end of the function? I do not see any difference between:and
Just that the first is deleting two entries and second three entries. If I have not missed anything, I think we can safely remove the remaining part of the test in this cleanup as well. What do you think?
Comment #9
avpadernoI was a bit confused by the following lines in the test.
Reading them after reading your comment, I think the last three lines are merely testing the effect of
variable_set('cache_clear_threshold', 2);and I agree they should be removed.Comment #10
avpadernoActually, all these lines can be removed.
The last line makes clear what their purpose is: All cache entries removed when the array exceeded the cache clear threshold.
Since there is no longer a cache clear threshold, they are not useful.
Comment #11
poker10 commentedYes, that is what I meant (sorry if I was not clear enough). The clear cache behavior with an array is still being tested on lines which are left in that function. I think this change looks good now. Thanks!
Comment #13
mcdruid commentedLess code = more good.
Thanks!