Skip to content

Parallel Testing Mongodb #3268

Feb 10, 2025 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

I made parallel testing work by providing custom setUpTestCase to create parallel multiple database, which in default it only creates when testcase uses one of this traits,

When testing mongodb, any of this trait doesnt play nice, refreshdatabase you cannot test when controller that has transaction because it disallows nested transaction, truncation foreign key error, transaction same with refreshdatabase issu, DatabaseMigrations 5x slower than without any trait

$databaseTraits = [
                Testing\DatabaseMigrations::class,
                Testing\DatabaseTransactions::class,
                Testing\DatabaseTruncation::class,
                Testing\RefreshDatabase::class,
       …

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@masterbater
Comment options

@GromNaN
Comment options

@masterbater
Comment options

@masterbater
Comment options

Comment options

You must be logged in to vote
2 replies
@masterbater
Comment options

@masterbater
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by masterbater
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants