-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure process starts with no output
- Loading branch information
Showing
5 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace ssigwart\ProcessPool; | ||
|
||
/** Process pool exception that is thrown if a newly started process already has STDOUT or STDERR output */ | ||
class ProcessPoolProcessOutputBeforeStartingException extends ProcessPoolException | ||
{ | ||
/** @var string[] STDERR lines */ | ||
private array $stderrLines = []; | ||
|
||
/** @var string[] STDOUT lines */ | ||
private array $stdoutLines = []; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string[] $stderrLines STDERR lines | ||
* @param string[] $stdoutLines STDOUT lines | ||
*/ | ||
public function __construct(array $stderrLines, array $stdoutLines) | ||
{ | ||
$this->stderrLines = $stderrLines; | ||
$this->stdoutLines = $stdoutLines; | ||
} | ||
|
||
/** | ||
* Get STDERR lines | ||
* | ||
* @return string[] STDERR lines | ||
*/ | ||
public function getStderrLines(): array | ||
{ | ||
return $this->stderrLines; | ||
} | ||
|
||
/** | ||
* Get STDOUT lines | ||
* | ||
* @return string[] STDOUT lines | ||
*/ | ||
public function getStdoutLines(): array | ||
{ | ||
return $this->stdoutLines; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":1,"defects":{"ProcessPoolTest::testProcessPool":3,"ProcessPoolTest::testProcessPoolErrors":3,"ProcessPoolTest::testProcessPoolWithLongMessage":4,"ProcessPoolTest::testInvalidResponse":3,"ProcessPoolTest::testProcessPoolNoRelease":3,"ProcessPoolTest::testProcessPoolWithLongResponse":4,"ProcessPoolTest::testProcessPoolEndOfFile":4,"ProcessPoolRequestTest::testProcessPoolEndOfFile":3,"ProcessPoolRequestTest::testProcessPoolInvalidMessage":3,"ProcessPoolTest::testProcessPoolWithLongStderrResponse":3,"ProcessPoolRequestTest::testProcessPoolParentClosedInput":3,"ProcessPoolRequestTest::testProcessPoolHangOnExit":4,"ProcessPoolTest::testProcessPoolExit":3,"ProcessPoolTest::testProcessPoolSlientExit":4,"ProcessPoolTest::testProcessPoolSilentExit":3,"ProcessPoolTest::testProcessPoolExitHang":3,"ProcessPoolRequestTest::testPeek":3,"ProcessPoolRequestTest::testWaitForStdoutOrStderr":4,"ProcessPoolRequestTest::testWaitForStderr":3,"ProcessPoolRequestTest::testWaitForStdout":3,"ProcessPoolTest::testProcessPoolShutDown":3,"ProcessPoolTest::testProcessPoolNoReadBeforeRelease":3,"ProcessPoolTest::testProcessPoolMarkedAsFailed":3},"times":{"ProcessPoolTest::testInvalidResponse":0.007,"ProcessPoolTest::testInvalidMaxSpares":0.003,"ProcessPoolTest::testProcessPool":0.444,"ProcessPoolTest::testProcessPoolErrors":0.107,"ProcessPoolTest::testProcessPoolNoRelease":0.098,"ProcessPoolTest::testProcessPoolWithLongMessage":0.096,"ProcessPoolTest::testProcessPoolWithLongWriteMessage":0.122,"ProcessPoolTest::testProcessPoolWithLongResponse":0.097,"ProcessPoolTest::testProcessPoolWithLongStderrResponse":0.15,"ProcessPoolTest::testProcessPoolEndOfFile":0.099,"ProcessPoolRequestTest::testProcessPoolEndOfFile":0.092,"ProcessPoolRequestTest::testProcessPoolInvalidMessage":0.209,"ProcessPoolRequestTest::testProcessPoolParentClosedInput":0.126,"ProcessPoolRequestTest::testProcessPoolHangOnExit":0.251,"ProcessPoolTest::testProcessPoolExit":0.097,"ProcessPoolTest::testProcessPoolSlientExit":0.101,"ProcessPoolTest::testProcessPoolSilentExit":0.099,"ProcessPoolTest::testProcessPoolExitHang":0.108,"ProcessPoolRequestTest::testPeek":0.113,"ProcessPoolRequestTest::testWaitForStdoutOrStderr":0.1,"ProcessPoolRequestTest::testWaitForStdout":0.113,"ProcessPoolRequestTest::testWaitForStderr":0.124,"ProcessPoolTest::testProcessPoolShutDown":0.131,"ProcessPoolTest::testProcessPoolNoReadBeforeRelease":0.101,"ProcessPoolTest::testProcessPoolNoReadBeforeRead":0.103,"ProcessPoolTest::testProcessPoolMarkedAsFailed":0.19}} | ||
{"version":1,"defects":{"ProcessPoolRequestTest::testWaitForStdout":3,"ProcessPoolRequestTest::testWaitForStderr":3,"ProcessPoolRequestTest::testProcessPoolInvalidMessage":3,"ProcessPoolRequestTest::testProcessPoolParentClosedInput":3,"ProcessPoolTest::testProcessPool":3,"ProcessPoolTest::testProcessPoolErrors":3,"ProcessPoolTest::testProcessPoolMarkedAsFailed":3,"ProcessPoolTest::testProcessPoolErrorBeforeResponse":3,"ProcessPoolTest::testProcessPoolNoReadBeforeRead":3,"ProcessPoolTest::testProcessPoolWithLongMessage":3,"ProcessPoolTest::testProcessPoolWithLongResponse":3,"ProcessPoolTest::testProcessPoolWithLongStderrResponse":3,"ProcessPoolTest::testProcessPoolExit":3,"ProcessPoolTest::testProcessPoolExitHang":3,"ProcessPoolTest::testProcessPoolShutDown":3},"times":{"ProcessPoolRequestTest::testWaitForStdout":0.109,"ProcessPoolRequestTest::testWaitForStderr":0.117,"ProcessPoolRequestTest::testProcessPoolInvalidMessage":0.211,"ProcessPoolRequestTest::testProcessPoolParentClosedInput":0.115,"ProcessPoolTest::testInvalidMaxSpares":0.002,"ProcessPoolTest::testProcessPool":0.454,"ProcessPoolTest::testProcessPoolErrors":0.111,"ProcessPoolTest::testProcessPoolMarkedAsFailed":0.197,"ProcessPoolTest::testProcessPoolErrorBeforeResponse":0.473,"ProcessPoolTest::testProcessPoolNoReadBeforeRead":0.101,"ProcessPoolTest::testProcessPoolWithLongMessage":0.093,"ProcessPoolTest::testProcessPoolWithLongResponse":0.092,"ProcessPoolTest::testProcessPoolWithLongStderrResponse":0.092,"ProcessPoolTest::testProcessPoolExit":0.092,"ProcessPoolTest::testProcessPoolSilentExit":0.097,"ProcessPoolTest::testProcessPoolExitHang":0.094,"ProcessPoolTest::testProcessPoolShutDown":0.119}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters