-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix integration test issue with interceptor #37187
base: 2.4-develop
Are you sure you want to change the base?
Conversation
I have seen the following error: ``` Property Magento\TestFramework\App\Config\Interceptor::$data does not exist ``` This is because `\Magento\TestFramework\Store\StoreManager::reinitStores` does not take into account that \Magento\TestFramework\App\Config as returned from the ObjectManager might just as well be a `\Magento\TestFramework\App\Config\Interceptor`, in case a plugin on that class exists for example. To be able to still get the data that is needed for the test, there is the need to test for the implementation of \Magento\Framework\Interception\InterceptorInterface and get the $data property from the parent.
Hi @AntonEvers. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Fix static tests failure
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests B2B, Functional Tests EE, Integration Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Approved.
Failing tests look not related to changes from this PR.
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests B2B, WebAPI Tests |
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Up. This error is still happening in M2.4.7 when creating new stores in Unit Tests. |
Hi @AntonEvers, Thanks for the collaboration & contribution! ✔️ QA Passed
Steps to reproduce
Builds are failed. Hence, moving this PR to Extended Testing. Thanks |
@magento run all tests |
@magento create issue |
@magento run Static Tests, Functional Tests B2B |
@magento run all tests |
@magento run Integration Tests, Functional Tests EE, Functional Tests CE, Functional Tests B2B |
The Functional EE test failures are different in recent 2 successive builds. They neither part of PR nor failing because of the PR changes, hence moving it to Merge in Progress. Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37187/8a6df4dc31de846608d1e326aa1ac1f2/Functional/allure-report-ee/index.html#categories/3e783d9810b21b0bfa2c0261030c68a9/90d7c732d52ca5fc/ Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37187/7457de28dcfa3b331a6f27a67f934504/Functional/allure-report-ee/index.html#categories/dabfadd59f1a7ac0df1ce9f37aec2ad5/f29e692f10aec123/ |
I have seen the following error:
This is because
\Magento\TestFramework\Store\StoreManager::reinitStores
does not take into account that \Magento\TestFramework\App\Config as returned from the ObjectManager might just as well be a\Magento\TestFramework\App\Config\Interceptor
, in case a plugin on that class exists for example.To be able to still get the data that is needed for the test, there is the need to test for the implementation of \Magento\Framework\Interception\InterceptorInterface and get the $data property from the parent.
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues:
Resolved issues: