wuchong 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_r369595211
##########
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:
Yes, there are multiple Table API tests in it. Because the thread's
classloader will be set to `ScalaClassLoader` in each test, and
`TableFactoryService` can't find the correct factory from `ScalaClassLoader`,
that's why we have to reset thread's classloader after each test.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services