Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: PHPUnit - groom configuration of time limits #5435

Merged
merged 1 commit into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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