You need to sign in or sign up before continuing.
Possible flaky test in backup-restore test suite
Context: Build failure at https://gitlab.com/charts/gitlab/-/jobs/106221269
Test that checks if images uploads to issue is loaded correctly is possibly flaky. This is because, we are testing whether the address defined by src
attribute of the image is returning 200. But, on checking the source code of the issue, we see this (split to multiple lines for readability)
<div class="wiki">
<p dir="auto">
<a class="no-attachment-icon" href="/root/testproject1/uploads/90701344e9ebb53fa9ebac83d43afdcc/Screen_Shot_2018-05-01_at_2.53.34_PM.png" target="_blank" rel="noopener noreferrer">
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="Screen_Shot_2018-05-01_at_2.53.34_PM" class="lazy" data-src="/root/testproject1/uploads/90701344e9ebb53fa9ebac83d43afdcc/Screen_Shot_2018-05-01_at_2.53.34_PM.png">
</a>
</p>
</div>
The image has lazy
class, which means it is being lazy loaded. So, src
is not pointing to the actual image, but data-src
is. Once the image is loaded, src
gets replaced by data-src
. So, if the test checks for src
, before the lazy loading is done, it gets the wrong data.
Proposal
Check if file mentioned in data-src
(instead of src
) is available and returns 200.
/cc @WarheadsSE