diff --git a/utils/flink-components-testkit/src/test/scala/pl/touk/nussknacker/engine/flink/util/test/FlinkTestScenarioRunnerSpec.scala b/utils/flink-components-testkit/src/test/scala/pl/touk/nussknacker/engine/flink/util/test/FlinkTestScenarioRunnerSpec.scala index 2631b93c5f5..297b218bc90 100644 --- a/utils/flink-components-testkit/src/test/scala/pl/touk/nussknacker/engine/flink/util/test/FlinkTestScenarioRunnerSpec.scala +++ b/utils/flink-components-testkit/src/test/scala/pl/touk/nussknacker/engine/flink/util/test/FlinkTestScenarioRunnerSpec.scala @@ -99,8 +99,8 @@ class FlinkTestScenarioRunnerSpec extends AnyFunSuite with Matchers with FlinkSp .build() .runWithData[Int, Int](scenario, List(10)) - runResults.validValue.errors.collect { case exc: NuExceptionInfo[_] => - exc.throwable.asInstanceOf[SpelExpressionEvaluationException].getMessage + runResults.validValue.errors.map(_.throwable).map { exc => + exc.asInstanceOf[SpelExpressionEvaluationException].getMessage } shouldBe List( "Expression [#input / 0 != 0] evaluation failed, message: divide by zero" ) diff --git a/utils/lite-components-testkit/src/test/scala/pl/touk/nussknacker/engine/lite/util/test/LiteTestScenarioRunnerSpec.scala b/utils/lite-components-testkit/src/test/scala/pl/touk/nussknacker/engine/lite/util/test/LiteTestScenarioRunnerSpec.scala index 0d9fa4394ed..830fc3f4551 100644 --- a/utils/lite-components-testkit/src/test/scala/pl/touk/nussknacker/engine/lite/util/test/LiteTestScenarioRunnerSpec.scala +++ b/utils/lite-components-testkit/src/test/scala/pl/touk/nussknacker/engine/lite/util/test/LiteTestScenarioRunnerSpec.scala @@ -135,8 +135,8 @@ class LiteTestScenarioRunnerSpec extends AnyFunSuite with Matchers with Validate .build() .runWithData[Int, Int](scenario, List(10)) - runResults.validValue.errors.collect { case exc: NuExceptionInfo[_] => - exc.throwable.asInstanceOf[SpelExpressionEvaluationException].getMessage + runResults.validValue.errors.map(_.throwable).map { exc => + exc.asInstanceOf[SpelExpressionEvaluationException].getMessage } shouldBe List( "Expression [#input / 0 != 0] evaluation failed, message: divide by zero" )