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

Prepare tests for running in process isolation #329

Merged
merged 1 commit into from Aug 25, 2021

Conversation

schlessera
Copy link
Collaborator

@schlessera schlessera commented Aug 25, 2021

While trying to run the tests with the --process-isolation flag of PHPUnit, I noticed several problems.

This PR fixes the ones that are obvious changes.

Even with these fixes, though, we cannot run the full test suite in process isolation, as there are multiple errors still. These are due to limitations in how PHPUnit runs the process isolation:

  • as data providers are being serialized to pass to the tests, we cannot use DOMDocument objects in data providers, as these cannot be serialized;
  • as STDOUT and STDERR are being redirected into temporary memory streams, we cannot use checks like posix_isatty(STDOUT), as these fail on the temporary streams.

/cc @swissspidy

@schlessera schlessera added the Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs label Aug 25, 2021
@schlessera schlessera added this to the 0.7.0 milestone Aug 25, 2021
@schlessera schlessera merged commit 715d077 into main Aug 25, 2021
@schlessera schlessera deleted the fix/prepare-tests-for-process-isolation branch August 25, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants