jarektkaczyk / eloquence-base

base for the Eloquence extensions + Searchable
https://softonsofa.com
MIT License
78 stars 71 forks source link

Running unit tests that involve Eloquence models fail #14

Open ragingdave opened 5 years ago

ragingdave commented 5 years ago

In app level unit tests that involve models that are using Eloquence, if the test isn't updated to use a stub like the unit tests of this package, then the tests will fail if there are enough unit tests that affect the model.

For example just running unit tests that would touch something eloquence wise (in my case Mappable and Mutable), outside of running individual tests which pass, will fail.

Here is output of a test which ends up trigger this error when run in my test suite but not in an individual test. And no that's not a copy paste error, that is directly from the run, and note that this is the second test to fail, but is 65th out of 90 in my test suite

2) Tests\Unit\Observers\ProductObserverTest::testPriceChangesAreStored
Error: Maximum function nesting level of '256' reached, aborting!

/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1367
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:914
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:518
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:901
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:929
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:623
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:571
/var/www/html/project1/vendor/sofa/hookable/src/Hookable.php:111
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/eloquence-mutable/src/Mutable/Hooks.php:43
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:84
/var/www/html/project1/vendor/sofa/hookable/src/Pipeline.php:88
/var/www/html/project1/vendor/sofa/hookable/src/Hookable.php:247
/var/www/html/project1/vendor/sofa/hookable/src/Hookable.php:114
/var/www/html/project1/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1531
/var/www/html/project1/tests/Unit/Observers/ProductObserverTest.php:128
/home/dcox/.config/composer/vendor/phpunit/phpunit/src/TextUI/Command.php:203
/home/dcox/.config/composer/vendor/phpunit/phpunit/src/TextUI/Command.php:159

Individual Run:

phpunit --filter testPriceChangesAreStored
PHPUnit 8.0.4 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 340 ms, Memory: 26.00 MB

OK (1 test, 12 assertions)

Other tests I was able to swap the usage to a EloquentStub like your unit tests, but that's just not always applicable to fix things.

The Observer test here is testing that changes in a new system make their way into a legacy system, where the models receiving the new system changes are utilizing Eloquence, Mutable, and Mappable as the field names are....less than ideal, and the legacy system has Y/N booleans that Mutable handles. It is worth noting that any amount of testing seems to trigger this issue once you are testing the same App level model over even a few tests in the same run.