Skip to content

Commit

Permalink
minor #5435 DX: PHPUnit - groom configuration of time limits (keradus)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.17 branch.

Discussion
----------

DX: PHPUnit - groom configuration of time limits

Commits
-------

c99c5f3 DX: PHPUnit - groom configuration of time limits
  • Loading branch information
keradus committed Jan 14, 2021
2 parents 21934b5 + c99c5f3 commit a11ca48
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ jobs:
if: matrix.execute-migration-rules == 'yes'
run: php php-cs-fixer fix --rules @PHP73Migration,@PHP71Migration:risky,blank_line_after_opening_tag -q

- name: Disable time limit for tests when collecting coverage
if: matrix.calculate-code-coverage == 'yes'
run: sed 's/enforceTimeLimit="true"/enforceTimeLimit="false"/g' phpunit.xml.dist > phpunit.xml

- name: Run tests
continue-on-error: ${{ matrix.php-version == '8.0' }}
env:
Expand Down
5 changes: 4 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
defaultTimeLimit="3"
enforceTimeLimit="true"
failOnWarning="true"
processIsolation="false"
stopOnFailure="false"
timeoutForSmallTests="2"
timeoutForSmallTests="3"
timeoutForMediumTests="6"
timeoutForLargeTests="9"
verbose="false"
>
<testsuites>
Expand Down
2 changes: 2 additions & 0 deletions tests/Linter/AbstractLinterTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public function testLintFile($file, $errorMessage = null)

/**
* @return array
*
* @medium
*/
public function provideLintFileCases()
{
Expand Down
1 change: 0 additions & 1 deletion tests/Smoke/AbstractSmokeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* @requires OS Linux|Darwin
* @coversNothing
* @group covers-nothing
* @large
*/
abstract class AbstractSmokeTest extends TestCase
{
Expand Down
1 change: 1 addition & 0 deletions tests/Smoke/StdinTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @requires OS Linux|Darwin
* @coversNothing
* @group covers-nothing
* @large
*/
final class StdinTest extends AbstractSmokeTest
{
Expand Down
1 change: 1 addition & 0 deletions tests/Test/AbstractIntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ protected function doTearDown()
* @dataProvider provideIntegrationCases
*
* @see doTest()
* @large
*/
public function testIntegration(IntegrationCase $case)
{
Expand Down

0 comments on commit a11ca48

Please sign in to comment.