Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 3, 2025

running
php phpunit tests/end-to-end/phar/tests/standard/GreeterTest.php -c tests/end-to-end/phar/phpunit.xml
with a fork Time: 00:00.005, Memory: 16.00 MB
with a subprocess Time: 00:00.031, Memory: 16.00 MB

Todo

  • implement PcntlForkJobRunner
  • make CI run with pcntl
  • fix tests
  • add attribute parameter to RunTestsInSeparateProcesses, RunInSeparateProcess to opt-in fork-mode

@staabm
Copy link
Contributor Author

staabm commented Aug 3, 2025

currently one test is failling:

1) /Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592-process-isolation.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 
 --
 
-There was 1 risky test:
+There were 2 risky tests:
 
 1) PHPUnit\TestFixture\Issue5592Test::testRemovedErrorHandler
 Test code or tested code removed error handlers other than its own
@@ @@
 
 /Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592/Issue5592Test.php:33
 
+2) PHPUnit\TestFixture\Issue5592Test::testRemovedExceptionHandler
+Test code or tested code removed exception handlers other than its own
+
+/Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592/Issue5592Test.php:52
+
 FAILURES!
-Tests: 6, Assertions: 6, Failures: 4, Risky: 1.
+Tests: 6, Assertions: 6, Failures: 4, Risky: 2.

/Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592-process-isolation.phpt:45
/Users/staabm/workspace/phpunit/src/Framework/TestSuite.php:374
/Users/staabm/workspace/phpunit/src/Framework/TestSuite.php:374
/Users/staabm/workspace/phpunit/src/TextUI/TestRunner.php:64
/Users/staabm/workspace/phpunit/src/TextUI/Application.php:228

FAILURES!
Tests: 4591, Assertions: 12200, Failures: 1, Skipped: 23, Incomplete: 1.

... I wonder why 0e4f6d8 started to ignore "Test code or tested code did not remove its own error handlers" when test run in isolation, but did not the same for "Test code or tested code removed error handlers other than its own" ?

edit: answered in 0e4f6d8#r163466240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant