From 46347728beb9ca280c05a99add131e9bcdfbaa8c Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Fri, 11 Aug 2023 00:44:27 +0800 Subject: [PATCH] [TOREE-543] Fix and enable JVMReprSpec (#209) --- scala-interpreter/build.sbt | 1 + .../toree/kernel/interpreter/scala/ScalaInterpreter.scala | 2 +- .../test/scala/integration/interpreter/scala/JVMReprSpec.scala | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scala-interpreter/build.sbt b/scala-interpreter/build.sbt index 39dcb023e..416c3d7f0 100644 --- a/scala-interpreter/build.sbt +++ b/scala-interpreter/build.sbt @@ -17,5 +17,6 @@ import sbt.Tests.{Group, SubProcess} * limitations under the License */ +Test / fork := true libraryDependencies ++= Dependencies.sparkAll.value libraryDependencies += "com.github.jupyter" % "jvm-repr" % "0.1.0" diff --git a/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala b/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala index 82b7c9b7e..1938719e1 100644 --- a/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala +++ b/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala @@ -155,7 +155,7 @@ class ScalaInterpreter(private val config:Config = ConfigFactory.load) extends I doQuietly { bind( - "kernel", "org.apache.toree.kernel.api.Kernel", + "kernel", "org.apache.toree.kernel.api.KernelLike", kernel, List( """@transient implicit""") ) } diff --git a/scala-interpreter/src/test/scala/integration/interpreter/scala/JVMReprSpec.scala b/scala-interpreter/src/test/scala/integration/interpreter/scala/JVMReprSpec.scala index 0d10834a2..2cd7447f8 100644 --- a/scala-interpreter/src/test/scala/integration/interpreter/scala/JVMReprSpec.scala +++ b/scala-interpreter/src/test/scala/integration/interpreter/scala/JVMReprSpec.scala @@ -28,13 +28,12 @@ import org.apache.toree.interpreter.Results.Success import org.apache.toree.kernel.api.{DisplayMethodsLike, KernelLike} import org.apache.toree.kernel.interpreter.scala.ScalaInterpreter import org.mockito.Mockito.doReturn -import org.scalatest.{BeforeAndAfter, FunSpec, Ignore, Matchers} +import org.scalatest.{BeforeAndAfter, FunSpec, Matchers} import org.scalatestplus.mockito.MockitoSugar import scala.util.Random @SbtForked -@Ignore class JVMReprSpec extends FunSpec with Matchers with MockitoSugar with BeforeAndAfter { private val outputResult = new ByteArrayOutputStream()