Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Filesystem] Change the picture used in a flaky tests #54472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Apr 3, 2024

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

There's a flaky test in the CI for a while now because of an image file.

I tried comparing pictures with https://www.robots.ox.ac.uk and found the following intriguing result:

Capture d’écran 2024-04-03 à 13 44 05

I tried to compare the IDAT section of each PNG. They differ a bit, but nothing huge. But they differ, which cause the test to fail. After having a look for some time, I genuinely can't tell why is that. What I know for sure is that I've been able to reproduce it once, then I ran the test again and I couldn't reproduce it anymore. There's something with this logo that I can't understand. Or maybe some cache/CDN is involved?

I suggest using another picture (from https://symfony.com/logo) to avoid what happens with this precise picture. This will correct the flakiness of the test. The new picture is 8KB, the current one is 1.6KB which seems reasonable to me.

@carsonbot carsonbot added this to the 5.4 milestone Apr 3, 2024
@alexandre-daubois alexandre-daubois changed the title [Filesystem] Change the picture used in a currently flaky tests [Filesystem] Change the picture used in flaky tests Apr 3, 2024
@alexandre-daubois alexandre-daubois changed the title [Filesystem] Change the picture used in flaky tests [Filesystem] Change the picture used in a flaky tests Apr 3, 2024
@@ -170,7 +170,7 @@ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
if (!\in_array('https', stream_get_wrappers())) {
$this->markTestSkipped('"https" stream wrapper is not enabled.');
}
$sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png';
$sourceFilePath = 'https://symfony.com/logos/symfony_black_02.png';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$sourceFilePath = 'https://symfony.com/logos/symfony_black_02.png';
$sourceFilePath = 'https://symfony.com/favicon.ico';

< 4ko, and this URL is 99.9% guaranteed to not change soon

🤷

(just a suggestion passing by :) )

@xabbuh
Copy link
Member

xabbuh commented Apr 3, 2024

see #54388

@alexandre-daubois
Copy link
Member Author

I was sure I saw something about it but couldn't find it. Thanks @xabbuh, seems way better like this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.