paratestphp / paratest

:computer: Parallel testing for PHPUnit
MIT License
2.3k stars 226 forks source link

Unit testing failing on multiple database connection #843

Closed shahakshay938 closed 6 months ago

shahakshay938 commented 6 months ago
Q A
ParaTest version 7.3.1
PHPUnit version 10.5.10
PHP version 8.1.27

Summary

Using multiple database connections not Refreshing the database using "RefreshDatabase" trait. check this https://github.com/laravel/framework/issues/50194

Current behavior

All unit test cases are failing as it was not able to handle multiple database connection working fine with single database connection

How to reproduce: command, code and error stack trace

  1. Create a new Laravel Breeze project or use an existing one.
  2. Set up two database connections.
  3. Update models and migrations to use the desired database via the $connection property.
  4. Write test cases or use existing ones (default provided by Breeze).
  5. Run the tests.

Expected behavior

It should pass the test cases by refreshing multiple database connection with --parallel option

Slamdunk commented 6 months ago

Please report the issue to Laravel, RefreshDatabase isn't in this library.