Closed (fixed)
Project:
Memcache API and Integration
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2018 at 03:15 UTC
Updated:
25 Jul 2024 at 17:24 UTC
Jump to comment: Most recent
Comments
Comment #2
damiankloip commentedWe do already have MemcacheBackendUnitTest that extends GenericCacheBackendUnitTestBase. DatabaseBackendTagTest looks like it could be similarly useful, but invalidations via the backend are covered by \Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase::testInvalidateTags too. The tag test looks like it'd be good to check when we're actually writing tags though.
Comment #3
anavarreComment #4
anavarreComment #5
moshe weitzman commentedI no longer see MemcacheBackendUnitTest in 8.x version. Did we lose test coverage over the years?
Comment #6
japerryMemcacheBackendUnitTest was moved/renamed to the MemcacheBackendTest in 2018 by Damian.
https://git.drupalcode.org/project/memcache/-/commit/f30543ba2d991e5fd06...
There isn't any issue associated with it, but I'm guessing it had to do with the bootstrapping of memcache. Interestingly its still referencing GenericCacheBackendUnitTestBase -- so I'm not sure why it was moved out of a unit test.
Comment #7
ericgsmith commentedThe existing failures have come up in a couple of issues, #2996615: Transaction support for cache (tags) invalidation and #3397864: Add optional DDEV dev environment
Debugging I found that a lot of times where the get is called the cache item created and last bin deleted timestamps were the same - so the data is returned from memcache but when timeIsGreaterThanBinDeletionTime is called in the memcache backed, the timestamps are equal so it returns false and doesn't return anything from the cache backend service.
I tried in https://git.drupalcode.org/project/memcache/-/merge_requests/22/diffs?co... to reduce the tolerance to 0 and that greatly reduced the number of test failures, but not all of them - so I suspect there are additional issues, or the tolerance of 0 is still somehow flakey.
If think it makes sense to tackle the existing failures in this issue first so just cross posting here.
Comment #10
japerryThanks ericgsmith for the MR! I've been playing around with the test failures as well to no avail. Going to merge in your MR for now but keep this issue open and NW due to the remaining failures...
Comment #14
japerryTests are passing and reliably both locally and on gitlabci! Thanks Wim for the rubber ducking with me!