Skip to content

33293: Eliminated AspectMock usage from PersistedObjectHandlerTest.php #853

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

Conversation

anzin
Copy link
Contributor

@anzin anzin commented Jul 15, 2021

Description

I've eliminated AspectMock usage from dev/tests/unit/Magento/FunctionalTestFramework/DataGenerator/Handlers/PersistedObjectHandlerTest.php

Fixed Issues (if relevant)

  1. Fixes [MFTF] Replace AspectMock with PHPUnit for PersistedObjectHandlerTest magento2#33293:[MFTF] Replace AspectMock with PHPUnit for PersistedObjectHandlerTest

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/verification tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

@magento-engcom-team magento-engcom-team added Partner: Atwix partners-contribution Pull Request is created by Magento Partner labels Jul 15, 2021
andrewbess
andrewbess previously approved these changes Jul 15, 2021
Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

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

Hello @anzin
Thank you for your contributing.

@jilu1
Copy link
Contributor

jilu1 commented Jul 21, 2021

@magento-engcom-team
Copy link

@jilu1 the pull request successfully imported.

@jilu1 jilu1 removed the accept label Jul 21, 2021

return self::$INSTANCE;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@anzin CurlHandler is widely used in MFTF and called repeatedly in test runs. Changing it to singleton may not work. Let me know if you think otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @jilu1, I added new changes by deleting singleton, please check if this solution is better.

Thank you.

@andrewbess andrewbess self-assigned this Jul 22, 2021
@jilu1 jilu1 closed this Jul 22, 2021
@jilu1 jilu1 reopened this Jul 22, 2021
@jilu1
Copy link
Contributor

jilu1 commented Jul 22, 2021

Closed by accident. reopen it :)

@anzin anzin force-pushed the improvement/mftf-33293-eliminate-aspect-mock-from-persisted-object-handler-test branch from 77e13bb to 0c94ebb Compare July 22, 2021 20:33
@anzin anzin force-pushed the improvement/mftf-33293-eliminate-aspect-mock-from-persisted-object-handler-test branch 2 times, most recently from eb6edc6 to 940373c Compare July 22, 2021 20:57
@anzin anzin force-pushed the improvement/mftf-33293-eliminate-aspect-mock-from-persisted-object-handler-test branch from 940373c to 842f9f5 Compare July 22, 2021 21:01
@bohdan-harniuk bohdan-harniuk self-requested a review July 23, 2021 10:34
bohdan-harniuk
bohdan-harniuk previously approved these changes Jul 23, 2021
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

Hello, @anzin!
Thank you, for your contribution! I like your implementation!

Hello, @jilu1!
This task was finished without creating new singletons, so it is not a blocker. You can proceed with the code review.

Thanks, Bohdan

@jilu1
Copy link
Contributor

jilu1 commented Jul 23, 2021

@magento-engcom-team
Copy link

@jilu1, an error occurred during the Pull Request import.

@jilu1
Copy link
Contributor

jilu1 commented Jul 23, 2021

@anzin Is this PR ready for review?

@anzin
Copy link
Contributor Author

anzin commented Jul 23, 2021

Hello, @jilu1 Yes, you can review this PR. @bohdan-harniuk has found one mistake and asked me to fix that. Now everything should be fine.

bohdan-harniuk
bohdan-harniuk previously approved these changes Jul 23, 2021
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

Hi, @jilu1!
You can review this PR.
Thanks, Bohdan

@jilu1
Copy link
Contributor

jilu1 commented Jul 28, 2021

@magento-engcom-team
Copy link

@jilu1, an error occurred during the Pull Request import.

@jilu1
Copy link
Contributor

jilu1 commented Jul 28, 2021

@magento-engcom-team
Copy link

@jilu1 the pull request successfully imported.

@jilu1
Copy link
Contributor

jilu1 commented Jul 28, 2021

@bohdan-harniuk
Copy link
Contributor

@anzin
Should you also update here
https://github.com/magento/magento2-functional-testing-framework/pull/853/files#diff-16310c27840f10b029f0073735a9e114d59562a084c5e38a109eacdbf3a05f5cR265?

Nice solution!

Hello, @jilu1!

Your link leads to the same PR and with outdated changes (I cannot see what you wanted to show).
Could you please check it and provide what do we need to change?

Thanks, Bohdan

andrewbess
andrewbess previously approved these changes Jul 28, 2021
@jilu1
Copy link
Contributor

jilu1 commented Jul 28, 2021

@anzin
Should you also update here
https://github.com/magento/magento2-functional-testing-framework/pull/853/files#diff-16310c27840f10b029f0073735a9e114d59562a084c5e38a109eacdbf3a05f5cR265?
Nice solution!

Hello, @jilu1!

Your link leads to the same PR and with outdated changes (I cannot see what you wanted to show).
Could you please check it and provide what do we need to change?

Thanks, Bohdan

@bohdan-harniuk
I mean it looks like a missed update in line #264~#265 in PersistedObjectHandlerTest.php.

@bohdan-harniuk
Copy link
Contributor

bohdan-harniuk commented Jul 28, 2021

@anzin
Should you also update here
https://github.com/magento/magento2-functional-testing-framework/pull/853/files#diff-16310c27840f10b029f0073735a9e114d59562a084c5e38a109eacdbf3a05f5cR265?
Nice solution!

Hello, @jilu1!
Your link leads to the same PR and with outdated changes (I cannot see what you wanted to show).
Could you please check it and provide what do we need to change?
Thanks, Bohdan

@bohdan-harniuk
I mean it looks like a missed update in line #264~#265 in PersistedObjectHandlerTest.php.

Oh, I can see now!! Thank you, @jilu1! We will fix that!

@anzin anzin dismissed stale reviews from andrewbess and bohdan-harniuk via 63a1ed4 July 28, 2021 14:03
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

Hello, @anzin!
Thank you for such a quick fix!

@jilu1, thank you for your help here with identifying missed parts of the update!
Now everything is fine, please, check it!

Thanks, Bohdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accept in progress Partner: Atwix partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MFTF] Replace AspectMock with PHPUnit for PersistedObjectHandlerTest
6 participants