Skip to content

Commit

Permalink
[Tech] Workaround for flaky tests (#7040)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoworko authored Oct 30, 2024
1 parent ac960f7 commit e5bbbde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ trait NuResourcesTest
forwardedUserName = None
)
for {
_ <- dbioRunner.runInTransaction(writeProcessRepository.saveNewProcess(action))
// FIXME: Using method `runInSerializableTransactionWithRetry` is a workaround for problem with flaky tests
// (some tests failed with [java.sql.SQLTransactionRollbackException: transaction rollback: serialization failure])
// the underlying cause of that errors needs investigating
_ <- dbioRunner.runInSerializableTransactionWithRetry(writeProcessRepository.saveNewProcess(action))
id <- futureFetchingScenarioRepository.fetchProcessId(processName).map(_.get)
} yield id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ private[test] class ScenarioHelper(dbRef: DbRef, clock: Clock, designerConfig: C
forwardedUserName = None
)
for {
_ <- dbioRunner.runInTransaction(writeScenarioRepository.saveNewProcess(action))
// FIXME: Using method `runInSerializableTransactionWithRetry` is a workaround for problem with flaky tests
// (some tests failed with [java.sql.SQLTransactionRollbackException: transaction rollback: serialization failure])
// the underlying cause of that errors needs investigating
_ <- dbioRunner.runInSerializableTransactionWithRetry(writeScenarioRepository.saveNewProcess(action))
id <- futureFetchingScenarioRepository.fetchProcessId(scenarioName).map(_.get)
} yield id
}
Expand Down

0 comments on commit e5bbbde

Please sign in to comment.