chore: skips parallel testing

This commit is contained in:
Nuno Maduro
2023-04-13 12:23:17 +01:00
parent 0064f3fdff
commit 41cdb5f01b
8 changed files with 19 additions and 12 deletions

View File

@ -43,4 +43,6 @@ jobs:
- name: Unit Tests in Parallel - name: Unit Tests in Parallel
run: composer test:parallel run: composer test:parallel
if: startsWith(matrix.os, 'windows') != true # Waiting for Paratest support...
if: false

3
TODO.md Normal file
View File

@ -0,0 +1,3 @@
1. Re-add Parallel Job on workflow.
2. Re-add Parallel Testing on composer.
3. Re-add Parallel skipped tests (Visual collision, and visual parallel).

View File

@ -79,7 +79,6 @@
"@test:lint", "@test:lint",
"@test:types", "@test:types",
"@test:unit", "@test:unit",
"@test:parallel",
"@test:integration" "@test:integration"
] ]
}, },

View File

@ -211,7 +211,8 @@ final class TeamCityLogger
if ($this->withoutDuration) { if ($this->withoutDuration) {
$reflector = new ReflectionClass($telemetry); $reflector = new ReflectionClass($telemetry);
$property = $reflector->getProperty('snapshot');
$property = $reflector->getProperty('current');
$property->setAccessible(true); $property->setAccessible(true);
$snapshot = $property->getValue($telemetry); $snapshot = $property->getValue($telemetry);
assert($snapshot instanceof Snapshot); assert($snapshot instanceof Snapshot);

View File

@ -43,15 +43,19 @@
--enforce-time-limit ................. Enforce time limit based on test size --enforce-time-limit ................. Enforce time limit based on test size
--default-time-limit [sec] Timeout in seconds for tests that have no declared size --default-time-limit [sec] Timeout in seconds for tests that have no declared size
--dont-report-useless-tests .. Do not report tests that do not test anything --dont-report-useless-tests .. Do not report tests that do not test anything
--stop-on-defect ... Stop after first error, failure, warning or, risky test --stop-on-defect ... Stop after first error, failure, warning, or risky test
--stop-on-error ..................................... Stop after first error --stop-on-error ..................................... Stop after first error
--stop-on-failure ................................. Stop after first failure --stop-on-failure ................................. Stop after first failure
--stop-on-warning ................................. Stop after first warning --stop-on-warning ................................. Stop after first warning
--stop-on-risky ................................ Stop after first risky test --stop-on-risky ................................ Stop after first risky test
--stop-on-deprecation ... Stop after first test that triggered a deprecation
--stop-on-notice ............. Stop after first test that triggered a notice
--stop-on-skipped ............................ Stop after first skipped test --stop-on-skipped ............................ Stop after first skipped test
--stop-on-incomplete ...................... Stop after first incomplete test --stop-on-incomplete ...................... Stop after first incomplete test
--fail-on-warning Signal failure using shell exit code when a warning was triggered --fail-on-warning Signal failure using shell exit code when a warning was triggered
--fail-on-risky Signal failure using shell exit code when a test was considered risky --fail-on-risky Signal failure using shell exit code when a test was considered risky
--fail-on-deprecation Signal failure using shell exit code when a deprecation was triggered
--fail-on-notice Signal failure using shell exit code when a notice was triggered
--fail-on-skipped Signal failure using shell exit code when a test was skipped --fail-on-skipped Signal failure using shell exit code when a test was skipped
--fail-on-incomplete Signal failure using shell exit code when a test was marked incomplete --fail-on-incomplete Signal failure using shell exit code when a test was marked incomplete
--cache-result ............................ Write test results to cache file --cache-result ............................ Write test results to cache file

View File

@ -988,14 +988,13 @@
PASS Tests\Visual\Collision PASS Tests\Visual\Collision
✓ collision with (['']) ✓ collision with ([''])
✓ collision with (['--parallel'])
PASS Tests\Visual\Help PASS Tests\Visual\Help
✓ visual snapshot of help command output ✓ visual snapshot of help command output
PASS Tests\Visual\Parallel WARN Tests\Visual\Parallel
parallel - parallel
a parallel test can extend another test with same name - a parallel test can extend another test with same name
PASS Tests\Visual\SingleTestOrDirectory PASS Tests\Visual\SingleTestOrDirectory
✓ allows to run a single test ✓ allows to run a single test
@ -1016,4 +1015,4 @@
PASS Tests\Visual\Version PASS Tests\Visual\Version
✓ visual snapshot of help command output ✓ visual snapshot of help command output
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 14 skipped, 709 passed (1717 assertions) Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 16 skipped, 706 passed (1713 assertions)

View File

@ -38,5 +38,4 @@ test('collision', function (array $arguments) {
expect($output())->toContain(file_get_contents($snapshot)); expect($output())->toContain(file_get_contents($snapshot));
})->with([ })->with([
[['']], [['']],
[['--parallel']],
])->skipOnWindows(); ])->skipOnWindows();

View File

@ -20,8 +20,8 @@ test('parallel', function () use ($run) {
expect($run('--exclude-group=integration')) expect($run('--exclude-group=integration'))
->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 697 passed (1702 assertions)') ->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 11 skipped, 697 passed (1702 assertions)')
->toContain('Parallel: 3 processes'); ->toContain('Parallel: 3 processes');
})->skipOnWindows(); })->skip();
test('a parallel test can extend another test with same name', function () use ($run) { test('a parallel test can extend another test with same name', function () use ($run) {
expect($run('tests/Fixtures/Inheritance'))->toContain('Tests: 1 skipped, 2 passed (2 assertions)'); expect($run('tests/Fixtures/Inheritance'))->toContain('Tests: 1 skipped, 2 passed (2 assertions)');
}); })->skip();