Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7070

Rework ScalaShellITCase#testSubmissionOfExternalLibraryStream

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4.0
    • 1.4.0
    • Scala Shell, Tests
    • None

    Description

      The ScalaShellITCase makes use of flink-ml jar in one of it's tests. Since flink-ml is not even declared as a dependency the test only works because by coincidence flink-ml is build before flink-scala-shell.

        @Test
        def testSubmissionOfExternalLibraryBatch: Unit = {
        ...
        val folder = findLibraryFolder(
          "../flink-libraries/flink-ml/target/",
          "../../flink-libraries/flink-ml/target/")
        ...
        }
      
        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!")
        }
      

      At the very least we should declare the dependency, or even better rework this test to rely on a custom jar built in flink-scala-shell to reduce dependencies.

      Also, the exception message in findLibraryFolder should contain the folder it couldn't find.

      Attachments

        Issue Links

          Activity

            People

              aljoscha Aljoscha Krettek
              chesnay Chesnay Schepler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: