diff --git a/designer/server/src/test/scala/pl/touk/nussknacker/test/base/it/NuResourcesTest.scala b/designer/server/src/test/scala/pl/touk/nussknacker/test/base/it/NuResourcesTest.scala index 49bca689f65..4e7e42fc74d 100644 --- a/designer/server/src/test/scala/pl/touk/nussknacker/test/base/it/NuResourcesTest.scala +++ b/designer/server/src/test/scala/pl/touk/nussknacker/test/base/it/NuResourcesTest.scala @@ -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 } diff --git a/designer/server/src/test/scala/pl/touk/nussknacker/test/utils/domain/ScenarioHelper.scala b/designer/server/src/test/scala/pl/touk/nussknacker/test/utils/domain/ScenarioHelper.scala index 34507b6dee2..734e25f923e 100644 --- a/designer/server/src/test/scala/pl/touk/nussknacker/test/utils/domain/ScenarioHelper.scala +++ b/designer/server/src/test/scala/pl/touk/nussknacker/test/utils/domain/ScenarioHelper.scala @@ -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 }