phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Fixed #5230: @runClassInSeparateProcess has the same effect as @runTestsInSeparateProcesses

Open WalterWoshid opened this issue 2 years ago • 14 comments

Did some refactoring and now it works :)

I also did some testing for my personal use case and it works!!!

WalterWoshid avatar Feb 22 '23 22:02 WalterWoshid

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (a6319b7) 89.80% compared to head (bdf2488) 81.34%.

:exclamation: Current head bdf2488 differs from pull request most recent head 546f158. Consider uploading reports for the commit 546f158 to get more accurate results

Files Patch % Lines
src/Util/PHP/AbstractPhpProcess.php 79.31% 6 Missing :warning:
src/Framework/TestSuite.php 94.73% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               10.5    #5233      +/-   ##
============================================
- Coverage     89.80%   81.34%   -8.47%     
+ Complexity     6420     5866     -554     
============================================
  Files           680      629      -51     
  Lines         20389    18564    -1825     
============================================
- Hits          18311    15100    -3211     
- Misses         2078     3464    +1386     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 23 '23 05:02 codecov[bot]

@ob_end_clean(); in the template sometimes logs failed to delete buffer. No buffer to delete to the console. Not sure what it's needed for, maybe someone can look into it and place it at the right position

WalterWoshid avatar Feb 27 '23 21:02 WalterWoshid

I am sorry that I was not able to review this pull request sooner. Can you please explain on a conceptual what was wrong and how you fixed it? Thanks!

This pull request has conflicts that must be resolved. It also targets the main branch. It should target the 10.5 branch now (it should have targetted the 10.1 branch when it was created).

sebastianbergmann avatar Jan 13 '24 13:01 sebastianbergmann

Hi @sebastianbergmann,

as far as I remember, the logic for @runClassInSeparateProcess and @runTestsInSeparateProcesses was placed in the same loop for running tests which made it actually impossible to run the class in a separate process, which is why I moved the @runClassInSeparateProcess logic from TestCase to TestSuite. If you'd like, I can resolve the merge conflicts :)

WalterWoshid avatar Jan 16 '24 09:01 WalterWoshid

If you'd like, I can resolve the merge conflicts :)

Yes, please. Thanks!

sebastianbergmann avatar Jan 16 '24 09:01 sebastianbergmann

Done :)

WalterWoshid avatar Jan 16 '24 14:01 WalterWoshid

Sorry for the multiple actions, forgot the guidelines, then the type checking.

WalterWoshid avatar Jan 16 '24 14:01 WalterWoshid

Sorry for the multiple actions, forgot the guidelines, then the type checking.

No worries, I don't mind clicking that button ;)

sebastianbergmann avatar Jan 16 '24 14:01 sebastianbergmann

No worries, I don't mind clicking that button ;)

Good, because I changed the wrong variable and didn't check the tests again x(

Should be good now 👌

WalterWoshid avatar Jan 16 '24 15:01 WalterWoshid

Can you have a look into why the tests fail on PHP 8.3 and PHP 8.4? Thanks!

sebastianbergmann avatar Jan 16 '24 15:01 sebastianbergmann

Yes, I'll have a look at it :)

WalterWoshid avatar Jan 17 '24 11:01 WalterWoshid

Yes, I'll have a look at it :)

Any update on this? Thanks!

sebastianbergmann avatar Feb 08 '24 08:02 sebastianbergmann

Yes, I'll have a look at it :)

@WalterWoshid Any update on this? Thanks!

sebastianbergmann avatar Mar 15 '24 12:03 sebastianbergmann

@WalterWoshid do you have plans to finish this PR?

staabm avatar Apr 18 '24 13:04 staabm