I have never used postgres, but maybe it has problems due to double transactions? https://github.com/laravel/framework/blob/5.8/src/Illuminate/Foundation/Testing/RefreshDatabase.php#L80
Oct 3, 2022
4
Level 1
Laravel 9 Test with transaction freezes
So I have a problem with a functional test, I am using RefreshDatabase trait. The database is PostgreSQL, everything is ran with docker. The problem is that I have two methods that use $this->beginDatabaseTransaction() inside each method at the top and when I try to see if the test passes, everything freezes. No output back, no error nothing, it just stalls. I remove the $this->beginDatabaseTransaction() and I get green.
Thank you, I am trying to figure out if I can see where is the problem...
Please or to participate in this conversation.