-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Resolved test suite run in separated process executed one by one in separated process. #6063
base: main
Are you sure you want to change the base?
Resolved test suite run in separated process executed one by one in separated process. #6063
Conversation
…f array allowing class template to return array of objects when refactored.
src/Framework/TestSuite.php
Outdated
* | ||
* @throws Exception | ||
*/ | ||
protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method, array $groups): void |
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.
why have this methods been moved in this file? this makes the actual diff hard to read (in case this has been done by CS-fixer, it might make sense todo the private
->public
transformation in a separate PR, so the rest gets readable)
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.
It was done by CS-fixer. Only changed the access type.
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.
I see, thx. I have this CS-fixer rule :)
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.
@sebastianbergmann wdyt about this CS fixer rule? :)
(most of the diff in this file of the PR is generated by the CS fixer sorting methods arround, because they changed the visibility. we don't see the actual changes anymore)
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.
saying just that, maybe @akotulu could use separate commits for the CS fixing changes and the rest, so we could review commit by commit
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.
I agree that there is a conflict of objectives at play here: one the one hand, I want methods to be ordered in a certain way. On the other hand, the proposed changes should be readable. In this case the method ordering gets in the way of patch readability because the visitbility of a method is changed.
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.
Ok, how can I revert it or close this branch and add the modifications without CS fixer?
Hmm, atm I will revert the function back and add the modifications. Rebase and commit to this pull request. After successful review I will commit again with CS fixer?
please rebase |
Rebased to main, also reverted to CS-fixer changes. Do I need to make a new pull request from my main? |
Force-pushing the current state to this PR should be enough. |
1f79abe
to
f4728e7
Compare
Hope I did it right. |
Hey, any progress on the review? |
I am currently only able to work for very short periods of time (and should not even do that), see https://phpc.social/deck/@sebastian/113487079241563305. I will get to this as soon as I am able to and kindly ask for your patience. |
f4728e7
to
387c163
Compare
Can you have a look at the failing tests, please? Thank you. |
387c163
to
4935bec
Compare
I've fixed the tests (lack of directory for temp files for some reason). Also I've improved the |
Force-pushing to this pull request should be fine. |
ec57fac
to
f4728e7
Compare
Done, hopefully didn't mess it up :) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6063 +/- ##
============================================
- Coverage 95.08% 95.05% -0.04%
- Complexity 6738 6742 +4
============================================
Files 725 724 -1
Lines 21251 21255 +4
============================================
- Hits 20207 20203 -4
- Misses 1044 1052 +8 ☔ View full report in Codecov by Sentry. |
Let me begin by expressing my gratitude for your persistence in working on this. This must not have been easy, especially since you sometimes had to wait a long time for my feedback, as well as do extra work to iterate this pull request based on my feedback. Looking at the end-to-end tests that your pull request adds to PHPUnit's test suite, I trust that the changes you propose will restore the originally intended behavior of I am not comfortable with the increase in complexity that the proposed changes introduce into the template that is used to generate the code that is run in a separate process. I would much rather reduce the amount of code in these templates than add more code to them, since the code in these templates is not seen by static analysis and the IDE. I am beginning to wonder if deprecating Running all tests of a test-case class in a single separate process was intended as a trade-off between isolation and performance. Personally, I prefer isolation over performance. Combined with the added complexity to make I have not made a decision yet, but wanted to give you an update sooner rather than later. |
Understand the trouble. This feature is for us and I think for others is needed cause our 'old' project contains micro modules which each has its own global defines. Running test suite for each module will define values for first module and next module wont behave as intended cause the defines cannot be redefined. We are atm moving away from old Zend Framework v1 but still this is a long process. |
Second pass of resolving
RunClassInSeparateProcess
attribute issues runningTestSuite
tests one by one in a separated process and calling before and after class methods for each test in the suite. Also test suite in separated process called primary process before and after class methods.Created separated branch, it contains first pass modifications as well.