Skip to content
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

[Issue] Static properties serialization fix. #28319

Closed
4 tasks
ghost opened this issue May 21, 2020 · 2 comments · Fixed by #26175
Closed
4 tasks

[Issue] Static properties serialization fix. #28319

ghost opened this issue May 21, 2020 · 2 comments · Fixed by #26175
Labels
Component: Serialize Component: TestFramework Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Done Has been reviewed and prioritized during Triage with Product Managers

Comments

@ghost
Copy link

ghost commented May 21, 2020

This issue is automatically created based on existing pull request: #26175: Static properties serialization fix.


Preconditions(*)

When test cleanup is disabled, Magento\TestFramework\Workaround\Cleanup\StaticProperties is caching static variables before the integration test starts, and restoring them after the test run is finished (if some instance of \Magento\TestFramework\TestCase\AbstractController has run).
Serialization and unserialization of static properties are provided by Magento\Framework\Serialize\Serializer\Json class, which wraps json_encode and json_decode functions.
Some of static properties are objects (e. g. \Magento\Framework\Autoload\AutoloaderRegistry::$autoloader). After encoding and decoding these properties through JSON we are getting arrays instead of objects. So we are facing issues on consecutive runs of integration tests.

Fixed Issues (if relevant)

  1. None

Steps to reproduce(*)

  1. Disable the application cleanup in integration tests phpunit.xml:
    <const name="TESTS_CLEANUP" value="disabled"/>
  2. Run some controller integration test (e. g. \Magento\Newsletter\Controller\ManageTest)
  3. Run some another controller integration test (e. g. AdminNotification test bundle)

Actual Result:

Expected Result:
tests should run successfully

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
@ghost ghost added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label May 21, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label May 21, 2020
@ghost ghost assigned p-bystritsky May 21, 2020
@ghost ghost added this to PR In Progress in Community Backlog May 21, 2020
@ghost ghost added the Priority: P3 May be fixed according to the position in the backlog. label May 21, 2020
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Jun 16, 2020
@ghost ghost moved this from PR In Progress to Ready for QA in Community Backlog Jun 16, 2020
@engcom-Alfa engcom-Alfa added Component: Serialize Component: TestFramework Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Progress: ready for QA labels Jun 16, 2020
@ghost ghost moved this from Ready for QA to Ready for Dev in Community Backlog Jun 16, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-35203 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jun 16, 2020
@magento-engcom-team magento-engcom-team added the Triage: Done Has been reviewed and prioritized during Triage with Product Managers label Jun 22, 2020
@ghost ghost moved this from Ready for Dev to PR In Progress in Community Backlog Jul 28, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Aug 14, 2020
@ghost ghost moved this from PR In Progress to Done (last 30 days) in Community Backlog Aug 14, 2020
@ghost ghost added the Progress: done label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Serialize Component: TestFramework Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Done Has been reviewed and prioritized during Triage with Product Managers
Projects
No open projects
Community Backlog
  
Done (last 30 days)
Development

Successfully merging a pull request may close this issue.

3 participants