Skip to content

Commit

Permalink
Enhancement: Sleep during setUpBeforeClass(), setUp(), tearDown(), an…
Browse files Browse the repository at this point in the history
…d tearDownAfterClass()
  • Loading branch information
localheinz committed Dec 3, 2023
1 parent ea86b19 commit c30d864
Show file tree
Hide file tree
Showing 15 changed files with 230 additions and 42 deletions.
20 changes: 20 additions & 0 deletions test/EndToEnd/Version10/DefaultConfiguration/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version10/MaximumCount/Three/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version10/MaximumDuration/Fifty/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version8/DefaultConfiguration/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 10 additions & 10 deletions test/EndToEnd/Version8/DefaultConfiguration/test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Random %seed: %s

Detected 11 tests that took longer than expected.

1. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050)
2. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000)
3. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950)
4. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900)
5. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850)
6. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800)
7. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750)
8. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
9. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
10. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)
1. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050)
2. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000)
3. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950)
4. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900)
5. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850)
6. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800)
7. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750)
8. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
9. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
10. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)

There is 1 additional slow test that is not listed here.

Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version8/MaximumCount/Three/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
6 changes: 3 additions & 3 deletions test/EndToEnd/Version8/MaximumCount/Three/test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Random %seed: %s

Detected 4 tests that took longer than expected.

1. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
2. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
3. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)
1. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
2. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
3. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)

There is 1 additional slow test that is not listed here.

Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version8/MaximumDuration/Fifty/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 12 additions & 8 deletions test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ Random %seed: %s

.......... 10 / 10 (100%)

Detected 6 tests that took longer than expected.

1. 0.2%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation
2. 0.2%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration
3. 0.1%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration
4. 0.1%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation
5. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt
6. 0.0%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation
Detected 10 tests that took longer than expected.

1. 0.3%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation
2. 0.3%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration
3. 0.2%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration
4. 0.2%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation
5. 0.2%s (0.140) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromMaximumDurationAnnotation
6. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt
7. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (7.4, 8.5.19, locked)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (7.4, 8.5.19, lowest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.1, 8.5.19, lowest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.0, 8.5.19, highest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.1, 8.5.19, locked)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.1, 8.5.19, highest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.2, 8.5.19, lowest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.3, 8.5.19, highest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.2, 8.5.19, highest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.0, 8.5.19, locked)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (7.4, 8.5.19, highest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.3, 8.5.19, lowest)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.2, 8.5.19, locked)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.3, 8.5.19, locked)

Failed asserting that string matches format description.

Check failure on line 32 in test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt

View workflow job for this annotation

GitHub Actions / Tests (8.0, 8.5.19, lowest)

Failed asserting that string matches format description.
8. 0.1%s (0.100) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromSlowThresholdAnnotation
9. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithSlowThresholdAnnotationWhereValueIsNotAnInt
10. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperDoesNotSleepAtAll

Time: %s, Memory: %s

Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version9/DefaultConfiguration/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
20 changes: 10 additions & 10 deletions test/EndToEnd/Version9/DefaultConfiguration/test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Random %seed: %s

Detected 11 tests that took longer than expected.

1. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050)
2. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000)
3. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950)
4. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900)
5. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850)
6. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800)
7. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750)
8. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
9. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
10. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)
1. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050)
2. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000)
3. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950)
4. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900)
5. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850)
6. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800)
7. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750)
8. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
9. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
10. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)

There is 1 additional slow test that is not listed here.

Expand Down
20 changes: 20 additions & 0 deletions test/EndToEnd/Version9/MaximumCount/Three/SleeperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase
{
use Test\Util\Helper;

public static function setUpBeforeClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public static function tearDownAfterClass(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function setUp(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

protected function tearDown(): void
{
Test\Fixture\Sleeper::fromMilliseconds(50)->sleep();
}

public function testSleeperDoesNotSleepAtAll(): void
{
$milliseconds = 0;
Expand Down
6 changes: 3 additions & 3 deletions test/EndToEnd/Version9/MaximumCount/Three/test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Random %seed: %s

Detected 4 tests that took longer than expected.

1. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
2. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
3. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)
1. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700)
2. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650)
3. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600)

There is 1 additional slow test that is not listed here.

Expand Down
Loading

0 comments on commit c30d864

Please sign in to comment.