-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[IntegrationTests] Tests in EavSetupTest affect global state #39616
Comments
because the affect global state (adding error messages to the `Magento\Eav\Model\Validator\Attribute\Code` service) which will affect further tests that try to add eav attributes. This change fixes magento#39616.
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @stollr, Thanks for the report and collaboration! We have tried to reproduce the issue in the latest 2.4-develop branch and the issue is reproducible for us with the mentioned steps in the main description. Please refer to the below screenshot for reference: Hence confirming the issue. Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13910 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
because the affect global state (adding error messages to the `Magento\Eav\Model\Validator\Attribute\Code` service) which will affect further tests that try to add eav attributes. This change fixes magento#39616.
Preconditions and environment
Steps to reproduce
dev/tests/integration/testsuite/Magento/Eav/Setup/EavSetupTest.php
cd dev/tests/integration && ../../../vendor/bin/phpunit --filter EavSetupTest
)Expected result
All tests should be completed successfully.
Actual result
Our simple test fails, although it should not. The following message is outputted:
The reason is that during the previous tests, which tested to add attributes with invalid codes, the
Magento\Eav\Model\Validator\Attribute\Code
added error messages to its internal array, which are never resetted. That's why subsequent tests, which try to add attributes, will fail.Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: