Skip to content

Conversation

@aazsamir
Copy link
Contributor

@aazsamir aazsamir commented Nov 18, 2025

Use with
./vendor/bin/paratest instead of ./vendor/bin/phpunit
4min20s -> 50s

So now, tests have custom internalStorage set per worker. Paratest guarantees to set unique TEST_TOKEN.
Tests that modify files MUST use unique names for them (or use lock).

There were some kinda random errors due to container being statically set, so on tests tearDown I'm setting it to null.

@aazsamir aazsamir marked this pull request as draft November 18, 2025 15:45
@aazsamir aazsamir marked this pull request as ready for review November 19, 2025 09:18
@brendt brendt merged commit f5b5cd3 into tempestphp:main Nov 20, 2025
75 checks passed
@brendt
Copy link
Member

brendt commented Nov 20, 2025

Cool!

@brendt
Copy link
Member

brendt commented Nov 20, 2025

I am running into 70-ish database related errors on my machine

62) Tests\Tempest\Integration\Database\ConvenientWhereMethodsTest::test_where_not
Tempest\Database\Exceptions\QueryWasInvalid: SQLSTATE[HY000]: General error: 1 no such table: users

Any ideas to what might cause them? (They only happen with paratest)

@aazsamir
Copy link
Contributor Author

I am running into 70-ish database related errors on my machine

62) Tests\Tempest\Integration\Database\ConvenientWhereMethodsTest::test_where_not
Tempest\Database\Exceptions\QueryWasInvalid: SQLSTATE[HY000]: General error: 1 no such table: users

Any ideas to what might cause them? (They only happen with paratest)

hmm, no idea at the moment, I just pulled fresh main and on my machine there is 100% success rate

I suspect these lines, seems suspicious
https://github.com/tempestphp/tempest-framework/blob/main/tests/Integration/FrameworkIntegrationTestCase.php#L51

$databaseConfigPath = __DIR__ . '/../Fixtures/Config/database.config.php';

if (! file_exists($databaseConfigPath)) {
    copy(__DIR__ . '/../Fixtures/Config/database.sqlite.php', $databaseConfigPath);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants