Skip to content

TransactionStartException will always be throwed in tests with RefreshDatabase trait #463

Closed
@ibrunotome

Description

@ibrunotome

Describe your task
The test suite in laravel are always executed inside a database transaction if you're using the LazilyRefreshDatabase trait. After v8.2, all tests that has a wallet transaction are broken

To Reproduce
Steps to reproduce the behavior:

  1. write an action that has a app(DatabaseServiceInterface::class)->transaction.
  2. write a test with LazilyRefreshDatabase trait.

Expected behavior
The test will broke with "Bavix\Wallet\Internal\Exceptions\TransactionStartException : Working inside an embedded transaction is not possible", but this transaction was started by the framework itself, not in userland.

Server:

  • php version: 8.1
  • database: postgres 14
  • wallet version 8.2
  • cache lock: redis
  • cache wallets: redis

Metadata

Metadata

Assignees

Labels

good issueGood for newcomersquestionFurther information is requestedwontfixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions