提交 4d8cbec4 编写于 作者: M Maximilian Michels

[FLINK-4009][tests] fix Scala Shell external library tests for IntelliJ

上级 07a7b73b
......@@ -17,8 +17,7 @@
################################################################################
# Convenience file for local debugging of the JobManager/TaskManager.
log4j.rootLogger=OFF, console
log4j.rootLogger=ERROR, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
......@@ -173,7 +173,10 @@ class ScalaShellITCase extends TestLogger {
// find jar file that contains the ml code
var externalJar = ""
val folder = new File("../../flink-libraries/flink-ml/target/")
val folder = findLibraryFolder(
"../flink-libraries/flink-ml/target/",
"../../flink-libraries/flink-ml/target/")
val listOfFiles = folder.listFiles()
for (i <- listOfFiles.indices) {
......@@ -208,7 +211,10 @@ class ScalaShellITCase extends TestLogger {
// find jar file that contains the ml code
var externalJar = ""
val folder = new File("../../flink-libraries/flink-ml/target/")
val folder = findLibraryFolder(
"../flink-libraries/flink-ml/target/",
"../../flink-libraries/flink-ml/target/")
val listOfFiles = folder.listFiles()
for (i <- listOfFiles.indices) {
......@@ -406,4 +412,14 @@ object ScalaShellITCase {
out.toString + stdout
}
def findLibraryFolder(paths: String*): File = {
for (path <- paths) {
val folder = new File(path)
if (folder.exists()) {
return folder
}
}
throw new RuntimeException("Library folder not found in any of the supplied paths!")
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册