-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WrapperRunner: add
--max-batch-size
support (#714)
Co-authored-by: CheapHasz <[email protected]> Co-authored-by: Filippo Tessarotto <[email protected]>
- Loading branch information
1 parent
c4e16e8
commit 4b70abf
Showing
13 changed files
with
194 additions
and
9 deletions.
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"src" | ||
] | ||
}, | ||
"timeout": 10, | ||
"timeout": 30, | ||
"logs": { | ||
"stryker": { | ||
"report": "/^\\d+\\.x$/" | ||
|
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
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="../bootstrap.php" backupGlobals="true"> | ||
<testsuites> | ||
<testsuite name="ParaTest Fixtures"> | ||
<directory>./wrapper_batchsize_suite/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ParaTest\Tests\fixtures\wrapper_batchsize_suite; | ||
|
||
class FourTest extends WrapperBatchTestCase | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ParaTest\Tests\fixtures\wrapper_batchsize_suite; | ||
|
||
class OneTest extends WrapperBatchTestCase | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ParaTest\Tests\fixtures\wrapper_batchsize_suite; | ||
|
||
class ThreeTest extends WrapperBatchTestCase | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ParaTest\Tests\fixtures\wrapper_batchsize_suite; | ||
|
||
class TwoTest extends WrapperBatchTestCase | ||
{ | ||
} |
43 changes: 43 additions & 0 deletions
43
test/fixtures/wrapper_batchsize_suite/WrapperBatchTestCase.php
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,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ParaTest\Tests\fixtures\wrapper_batchsize_suite; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use ReflectionClass; | ||
|
||
use function file_put_contents; | ||
use function getenv; | ||
use function getmypid; | ||
use function str_replace; | ||
|
||
abstract class WrapperBatchTestCase extends TestCase | ||
{ | ||
private const TMP_DIR_PATH = __DIR__ . DS . 'tmp'; | ||
|
||
public function testToken(): void | ||
{ | ||
$tokenFile = self::TMP_DIR_PATH . DS . 'token' . DS . $this->getFileSuffix(); | ||
$token = getenv('TEST_TOKEN'); | ||
static::assertIsString($token); | ||
file_put_contents($tokenFile, $token); | ||
static::assertStringEqualsFile($tokenFile, $token); | ||
} | ||
|
||
public function testPid(): void | ||
{ | ||
$pidFile = self::TMP_DIR_PATH . DS . 'pid' . DS . $this->getFileSuffix(); | ||
$pid = (string) getmypid(); | ||
file_put_contents($pidFile, $pid); | ||
|
||
static::assertStringEqualsFile($pidFile, $pid); | ||
} | ||
|
||
private function getFileSuffix(): string | ||
{ | ||
$refClass = new ReflectionClass(static::class); | ||
|
||
return str_replace(['\\', '/'], '_', $refClass->getName()); | ||
} | ||
} |
Empty file.
Empty file.