Skip to content

Investigate the cause of the error in integration tests 40P01: deadlock detected #26

@MDI74

Description

@MDI74

Need to find out the reason and fix the error that occurs in integration tests during parallel startup.
So that the tests were isolated from each other and worked stably.

Error example

System.InvalidOperationException : An exception has been raised that is likely due to a transient failure.
---- Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
-------- Npgsql.PostgresException : 40P01: deadlock detected

Current solution
Now, a partial class has been added as a solution to run Create and Update tests sequentially.

public partial class WorkEntryCommandTestsBase : IntegrationTestBase
{

}

Actions to reproduce the error

  1. Remove partial WorkEntryCommandTestsBase
  2. Run all tests until errors appear (error may not occur the first time)

As a solution, you can try the following

  1. Use different tenantId in the tests
  2. Use different startTime in the tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions