-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fails and warnings while running unit tests #12419
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
Comments
I haven't dug too deep into the code but it looks like when the filesystem mock is set up, However, that method is only called if there is an exception: https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/ProductVideo/Controller/Adminhtml/Product/Gallery/RetrieveImage.php#L123 None of the mocks being set up is told to throw an exception (unlike the So it looks like the failure itself is being caused by wrongly setting up the mock to expect a call to I am really surprised this error does not show up in Travis https://travis-ci.org/magento/magento2/jobs/307118009 |
This issue is not appearing on freshly installed 2.2.4-dev |
I can confirm that same issue in 2.2.0 |
Same issue in 2.2.2 |
This is the only failing test on 2.2.2 for me. |
Same issue with 2.2.3 |
@magento-engcom-team Can you tell us the commit where this is fixed? |
someone has been able to solve this issue or have excluded the tests of those two modules in the test suite? |
In <testsuite name="Magento Unit Tests">
...
<exclude>../../../setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/InstancesNamesList/DirectoryTest.php</exclude>
</testsuite> This does not solve the problem but avoids the error ... |
I have the same problem in 2.2.5. |
As noted by @barbazul, in https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/ProductVideo/Controller/Adminhtml/Product/Gallery/RetrieveImage.php#L123 the getDirectoryWrite function is only called if an exception is thrown. Removing expected test (which is wrong). |
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Hi @bnymn The issue was re-tested and we can confirm that it was fixed on the 2.3 release branch. We closing this issue as fixed due to upcoming 2.3 release that will be available soon. |
Did this become an issue when one of Magento's modules was updated? It's strange that a fail test went by unnoticed. This is impacting me on 2.2.4. |
Uh oh!
There was an error while loading. Please reload this page.
After fresh installation of Magento 2.2 via composer, some of the unit tests are failing.
Preconditions
Steps to reproduce
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist
.Expected result
Actual result
The text was updated successfully, but these errors were encountered: