X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FGlobalFunctions%2FwfShellExecTest.php;h=68bb1e968979c5d36496609c2fe7c72764e63a80;hb=9c7f6734c397a954b8eaa5ec73876f2b4bf92afb;hp=fcd26f541f33a9184bf9443294878eae5ce8e1d8;hpb=e054e34af8dcda9c454c8cb04caa0d55d0d3c5af;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/GlobalFunctions/wfShellExecTest.php b/tests/phpunit/includes/GlobalFunctions/wfShellExecTest.php index fcd26f541f..68bb1e9689 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfShellExecTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfShellExecTest.php @@ -5,15 +5,18 @@ * @covers ::wfShellExec */ class WfShellExecTest extends MediaWikiTestCase { - public function testBug67870() { - $command = wfIsWindows() - // 333 = 331 + CRLF - ? ( 'for /l %i in (1, 1, 1001) do @echo ' . str_repeat( '*', 331 ) ) - : 'printf "%-333333s" "*"'; + public function testT69870() { + if ( wfIsWindows() ) { + // T209159: Anonymous pipe under Windows does not support asynchronous read and write, + // and the default buffer is too small (~4K), it is easy to be blocked. + $this->markTestSkipped( + 'T209159: Anonymous pipe under Windows cannot withstand such a large amount of data' + ); + } // Test several times because it involves a race condition that may randomly succeed or fail for ( $i = 0; $i < 10; $i++ ) { - $output = wfShellExec( $command ); + $output = wfShellExec( 'printf "%-333333s" "*"' ); $this->assertEquals( 333333, strlen( $output ) ); } }