From 81d95d86370765af72df3eef0ebc098d24a5ab2f Mon Sep 17 00:00:00 2001 From: Arek Burdach Date: Fri, 17 Jan 2025 11:37:23 +0100 Subject: [PATCH] wip --- .../engine/process/runner/FlinkStubbedRunner.scala | 2 +- .../engine/process/runner/FlinkTestMainSpec.scala | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkStubbedRunner.scala b/engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkStubbedRunner.scala index a68ba94f844..77b0e19e2af 100644 --- a/engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkStubbedRunner.scala +++ b/engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkStubbedRunner.scala @@ -75,7 +75,7 @@ final class FlinkStubbedRunner(modelClassLoader: ModelClassLoader, configuration // see details in pl.touk.nussknacker.engine.flink.test.MiniClusterExecutionEnvironment#execute modelClassLoader.urls match { // FIXME abr: is it necessary? - case Nil => +// case Nil => // ConfigUtils.decodeListFromConfig[String, URL, MalformedURLException]( // configuration, // PipelineOptions.CLASSPATHS, diff --git a/engine/flink/executor/src/test/scala/pl/touk/nussknacker/engine/process/runner/FlinkTestMainSpec.scala b/engine/flink/executor/src/test/scala/pl/touk/nussknacker/engine/process/runner/FlinkTestMainSpec.scala index 187ba78fa46..e9c106297ee 100644 --- a/engine/flink/executor/src/test/scala/pl/touk/nussknacker/engine/process/runner/FlinkTestMainSpec.scala +++ b/engine/flink/executor/src/test/scala/pl/touk/nussknacker/engine/process/runner/FlinkTestMainSpec.scala @@ -41,11 +41,13 @@ import pl.touk.nussknacker.engine.testmode.TestProcess._ import pl.touk.nussknacker.engine.util.ThreadUtils import pl.touk.nussknacker.engine.{ModelConfigs, ModelData} import pl.touk.nussknacker.engine.deployment.AdditionalModelConfigs +import pl.touk.nussknacker.engine.testing.LocalModelData import java.util.{Date, UUID} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.concurrent.{Await, Future} +import scala.jdk.CollectionConverters._ class FlinkTestMainSpec extends AnyWordSpec with Matchers with Inside with BeforeAndAfterEach with OptionValues { @@ -765,6 +767,10 @@ class FlinkTestMainSpec extends AnyWordSpec with Matchers with Inside with Befor ): TestResults[_] = { val config = enrichDefaultConfig(ConfigFactory.load("application.conf")) .withValue("globalParameters.useIOMonadInInterpreter", ConfigValueFactory.fromAnyRef(useIOMonadInInterpreter)) + .withValue( + "classpath", + ConfigValueFactory.fromIterable(FlinkTestConfiguration.classpathWorkaround.map(_.toString).asJava) + ) // We need to set context loader to avoid forking in sbt val modelData = ModelData.duringFlinkExecution(