diff --git a/app/code/Magento/Indexer/Test/Unit/Model/ProcessManagerTest.php b/app/code/Magento/Indexer/Test/Unit/Model/ProcessManagerTest.php index 9e9d2a5c81aba..8cc8bbd5f96b1 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/ProcessManagerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/ProcessManagerTest.php @@ -35,6 +35,10 @@ public function testFailureInChildProcessHandleMultiThread(array $userFunctions, $processManager->execute($userFunctions); $this->fail('Exception was not handled'); } catch (\RuntimeException $exception) { + if (false !== strpos($exception->getMessage(), 'Warning: pcntl_fork(): Error 12')) { + $this->markTestSkipped('Cannot allocate memory during running pcntl_fork'); + } + $this->assertEquals('Fail in child process', $exception->getMessage()); } } @@ -117,6 +121,10 @@ public function testSuccessChildProcessHandleMultiThread(array $userFunctions, i try { $processManager->execute($userFunctions); } catch (\RuntimeException $exception) { + if (false !== strpos($exception->getMessage(), 'Warning: pcntl_fork(): Error 12')) { + $this->markTestSkipped('Cannot allocate memory during running pcntl_fork'); + } + $this->fail('Exception was not handled'); } }