-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
it.info.magnolia.integrationtests.cache.CacheTest#cacheableItem started to randomly fail with the following:
java.lang.AssertionError: Expected: a string containing "behaviour=useCache" but: was "CachePolicyResult{behaviour=store, cacheName=defaultPageCache, cacheKey=DefaultCacheKey{uri='/.resources/defaultMagnoliaLoginForm/img/favicon.ico', serverName='172.17.0.1', locale='en', channel='all', params={}', secure='false', method='get', additionalAttributes='{}'}, cachedEntry=info.magnolia.module.cache.filter.InMemoryCachedEntry@320cd616[gzippedContent=2087 bytes,plainContent=4406 bytes,characterEncoding=UTF-8,contentType=image/x-icon,lastModificationTime=1647586860000,originalUrl=http://172.17.0.1:8080/magnoliaPublic/.resources/defaultMagnoliaLoginForm/img/favicon.ico,serializableHeadersBackingList={Last-Modified=[1647586860000], Content-Type=[image/x-icon]},statusCode=200,timeToLiveInSeconds=-1]}"
It looks like a concurrent request that has nothing to do with the test gets in the way. Hence, the suggestion would be to improve info.magnolia.test.fixture.CacheMonitorFilter and allow it to take a key as parameter for a file, and to be able to verify the status for an object according to the key.
Implementation note
As a workaround we ignore/skip the test for now when the cache results returned by the CacheMonitorFilter belongs to a different request. See https://git.magnolia-cms.com/projects/PLATFORM/repos/ce/commits/662ce75be4e9194a39198dc33903d5f0cfdf2d8e
- split to
-
MGNLEE-688 Ignore test when cache monitor returns an alien result
- Closed