Parse Error when using processIsolation on windows #147

Closed
stof opened this Issue Feb 6, 2011 · 9 comments

Comments

3 participants
Contributor

stof commented Feb 6, 2011

I get a parse error when running tests on Windows 7 x64 with process isolation enabled. I solved the issue by replacing sleep(2) by sleep(3) in PHPUnit_Util_PHP

Contributor

whatthejeff commented Feb 8, 2011

This is related to #41

Contributor

stof commented Feb 8, 2011

Yes, but 2s is not sufficient in my case (and I faced the same issue running my tests on a Windows Vista 32 bits)

Contributor

whatthejeff commented Feb 8, 2011

I understand :). I'm just trying to provide more background information so that people who see this issue know the history behind it.

Contributor

whatthejeff commented Feb 11, 2011

I think #158 should fix this problem in a less system-dependent way. If you have some free time, feel free to try it out and let me know if it helps.

Contributor

stof commented Feb 11, 2011

I tried it and it works well for me for my test suite.

Contributor

whatthejeff commented Feb 11, 2011

Very nice. Thanks for your help. We'll see what sebastian has to say. It's a bit of extra file IO, but I think it's a probably a better solution overall.

Contributor

stof commented Feb 11, 2011

Yeah, I think the time needed for the sleep hack depends of the size of what is send to the subprocess as it worked when running a test suite alone but failed when running it generating code coverage (which means the PHP_CodeCoverage classes are loaded too).
your solution is definitely better on windows. And if the overhead is sensible, maybe using a temp file only on windows ?

Contributor

whatthejeff commented Feb 11, 2011

Yeah, only doing this for Windows is a possibility as well. I used this technique universally as I assumed there's a possibility you can hit buffer limits on other platforms which this also prevents.

Done.

christeredvartsen pushed a commit to christeredvartsen/phpunit that referenced this issue Apr 20, 2011

Fixes GH-147
 * Refactored `PHPUnit_Util_PHP::runJob()` to use a file-based solution.

christeredvartsen pushed a commit to christeredvartsen/phpunit that referenced this issue Apr 20, 2011

Refs GH-147
 * Only use the file-based solution for Windows.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment