[MGNLIMG-218] Imaging test broken on Jenkins Created: 14/Apr/20  Updated: 23/Apr/20  Resolved: 23/Apr/20

Status: Closed
Project: Imaging
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.3

Type: Task Priority: Neutral
Reporter: Maxime Michel Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Sprint: Maintenance 2, Maintenance 3, Maintenance 4
Story Points: 1

 Description   

info.magnolia.imaging.caching.CachingImageStreamerRepositoryTest#requestForSimilarUncachedImageOnlyGeneratesItOnce started to fail after I recreated the jobs. It doesn't seem to be random, nor an easy fix.

Stacktrace https://jenkins.magnolia-cms.com/job/modules/job/imaging/job/master/3/testReport/info.magnolia.imaging.caching/CachingImageStreamerRepositoryTest/requestForSimilarUncachedImageOnlyGeneratesItOnce/


Did investigate and I guess I found the cause. The test reveals a possible race condition where a thread tries to fetch a generated cached image before the latter is properly stored in JCR (see also https://git.magnolia-cms.com/projects/MODULES/repos/imaging/browse/magnolia-imaging/src/main/java/info/magnolia/imaging/caching/CachingImageStreamer.java#187)


Generated at Mon Feb 12 02:13:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.