I wanted to put this up for discussion before actually sending a PR.
Currently this package doesn't really support parallel testing reliably. I was exploring a few ways this could be solved. One option I really like is just appending the database name to the migration checksum file.
This basically allows you to switch between parallel and sequential testing as each database has its own checksum store. There would be no need to ever delete the migration checksum file. It would just work out of the box.
I think this makes a lot of sense, as the trait is ran per worker process which has a dedicated database. So ideally we store this information too.
I think changing this method to something as simple as
should already work.
Note: Not sure if the DB name can always be stored in a filesystem, so this should probably be processed. Also using the DB facade isn't as clean, as we have access to $this->app
I wanted to put this up for discussion before actually sending a PR. Currently this package doesn't really support parallel testing reliably. I was exploring a few ways this could be solved. One option I really like is just appending the database name to the migration checksum file.
This basically allows you to switch between parallel and sequential testing as each database has its own checksum store. There would be no need to ever delete the migration checksum file. It would just work out of the box.
I think this makes a lot of sense, as the trait is ran per worker process which has a dedicated database. So ideally we store this information too.
I think changing this method to something as simple as
should already work. Note: Not sure if the DB name can always be stored in a filesystem, so this should probably be processed. Also using the DB facade isn't as clean, as we have access to
$this->app
What do you think of this?