Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tech] Workaround for flaky tests #7040

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading