Skip to content

Commit

Permalink
Merge pull request #96 from clue-labs/tests
Browse files Browse the repository at this point in the history
Skip failing tests on bugged versions (PHP 8.1.7 and PHP 8.0.20 only)
  • Loading branch information
WyriHaximus committed Jun 25, 2022
2 parents 127eadc + b9567da commit 8280258
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/AbstractProcessTest.php
Expand Up @@ -643,6 +643,10 @@ public function testDetectsClosingStdoutWithoutHavingToWaitForExit()
$this->markTestSkipped('Process pipes not supported on Windows');
}

if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) {
$this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827');
}

$cmd = 'exec ' . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDOUT); sleep(1);');

$loop = $this->createLoop();
Expand All @@ -669,6 +673,10 @@ public function testDetectsClosingStdoutWithoutHavingToWaitForExit()
*/
public function testDetectsClosingStdoutSocketWithoutHavingToWaitForExit()
{
if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) {
$this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827');
}

$loop = $this->createLoop();
$process = new Process(
(DIRECTORY_SEPARATOR === '\\' ? '' : 'exec ') . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDOUT); sleep(1);'),
Expand Down Expand Up @@ -703,6 +711,10 @@ public function testKeepsRunningEvenWhenAllStdioPipesHaveBeenClosed()
$this->markTestSkipped('Process pipes not supported on Windows');
}

if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) {
$this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827');
}

$cmd = 'exec ' . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDIN);fclose(STDOUT);fclose(STDERR);sleep(1);');

$loop = $this->createLoop();
Expand Down Expand Up @@ -738,6 +750,10 @@ public function testKeepsRunningEvenWhenAllStdioPipesHaveBeenClosed()
*/
public function testKeepsRunningEvenWhenAllStdioSocketsHaveBeenClosed()
{
if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) {
$this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827');
}

$loop = $this->createLoop();
$process = new Process(
(DIRECTORY_SEPARATOR === '\\' ? '' : 'exec ') . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDIN);fclose(STDOUT);fclose(STDERR);sleep(1);'),
Expand Down

0 comments on commit 8280258

Please sign in to comment.