diff --git a/interpreter/src/main/scala/pl/touk/nussknacker/engine/testmode/TestServiceInvocationCollector.scala b/interpreter/src/main/scala/pl/touk/nussknacker/engine/testmode/TestServiceInvocationCollector.scala index 8165b6f23d1..46f92445f0c 100644 --- a/interpreter/src/main/scala/pl/touk/nussknacker/engine/testmode/TestServiceInvocationCollector.scala +++ b/interpreter/src/main/scala/pl/touk/nussknacker/engine/testmode/TestServiceInvocationCollector.scala @@ -44,7 +44,7 @@ class TestServiceInvocationCollector(testRunId: TestRunId) extends ResultCollect } //TODO: this should be somehow expressed via ResultCollector/TestServiceInvocationCollector -final class SinkInvocationCollector(runId: TestRunId, nodeId: String, ref: String) { +final class SinkInvocationCollector(runId: TestRunId, nodeId: String, ref: String) extends Serializable { def collect(context: Context, result: Any): Unit = { ResultsCollectingListenerHolder.updateResults( 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 0db255f3901..2631b93c5f5 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 NuExceptionInfo(_, e: SpelExpressionEvaluationException, _) => - e.getMessage + runResults.validValue.errors.collect { case exc: NuExceptionInfo[_] => + exc.throwable.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 24bd0ea6589..0d9fa4394ed 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 @@ -1,7 +1,5 @@ package pl.touk.nussknacker.engine.lite.util.test -import cats.data.NonEmptyList -import cats.data.Validated.Invalid import com.typesafe.config.ConfigValueFactory.fromAnyRef import com.typesafe.config.{Config, ConfigFactory} import org.scalatest.Inside @@ -14,10 +12,10 @@ import pl.touk.nussknacker.engine.api.process.ProcessObjectDependencies import pl.touk.nussknacker.engine.api.{MethodToInvoke, ParamName, Service} import pl.touk.nussknacker.engine.build.ScenarioBuilder import pl.touk.nussknacker.engine.spel.Implicits._ +import pl.touk.nussknacker.engine.spel.SpelExpressionEvaluationException import pl.touk.nussknacker.engine.util.functions.DateUtils import pl.touk.nussknacker.engine.util.test.{RunResult, TestScenarioRunner} import pl.touk.nussknacker.test.ValidatedValuesDetailedMessage -import pl.touk.nussknacker.engine.spel.SpelExpressionEvaluationException import java.time.{Clock, Instant, ZoneId} import java.util @@ -137,8 +135,8 @@ class LiteTestScenarioRunnerSpec extends AnyFunSuite with Matchers with Validate .build() .runWithData[Int, Int](scenario, List(10)) - runResults.validValue.errors.collect { case NuExceptionInfo(_, e: SpelExpressionEvaluationException, _) => - e.getMessage + runResults.validValue.errors.collect { case exc: NuExceptionInfo[_] => + exc.throwable.asInstanceOf[SpelExpressionEvaluationException].getMessage } shouldBe List( "Expression [#input / 0 != 0] evaluation failed, message: divide by zero" )