You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/22 13:26:23 UTC

[GitHub] [flink] aljoscha commented on a change in pull request #10874: [FLINK-15552][table api] parameters --library and --jar doesn't work for DDL in sqlClient

aljoscha commented on a change in pull request #10874: [FLINK-15552][table api] parameters --library and --jar doesn't work for DDL in sqlClient
URL: https://github.com/apache/flink/pull/10874#discussion_r369556795
 
 

 ##########
 File path: flink-scala-shell/src/test/scala/org/apache/flink/api/scala/ScalaShellITCase.scala
 ##########
 @@ -43,6 +43,13 @@ class ScalaShellITCase extends TestLogger {
   @Rule
   def temporaryFolder = _temporaryFolder
 
+  @After
+  def resetClassLoder(): Unit = {
+    // The Scala interpreter changes current class loader to ScalaClassLoader in every execution
+    // refer to [[ILoop.process()]]. So, we need reset it to original class loader after every Test.
+    Thread.currentThread().setContextClassLoader(classOf[ScalaShellITCase].getClassLoader)
 
 Review comment:
   The basic change makes sense, yes. But why doesn't it work if we only reset it after all tests? Is it because there are multiple tests where the scala shell test uses the table environment?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services