Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-8033 JDK 9 support
  3. FLINK-12049

ClassLoaderUtilsTest fails on Java 9

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.9.0
    • Component/s: Tests

      Description

      21:21:24.547 [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.214 s <<< FAILURE! - in org.apache.flink.runtime.util.ClassLoaderUtilsTest
      21:21:24.547 [ERROR] testWithAppClassLoader(org.apache.flink.runtime.util.ClassLoaderUtilsTest)  Time elapsed: 0.021 s  <<< FAILURE!
      java.lang.AssertionError
      	at org.apache.flink.runtime.util.ClassLoaderUtilsTest.testWithAppClassLoader(ClassLoaderUtilsTest.java:140)
      
      public void testWithAppClassLoader() {
      	String result = ClassLoaderUtil.getUserCodeClassLoaderInfo(ClassLoader.getSystemClassLoader());
      	assertTrue(result.toLowerCase().contains("system classloader"));
      

      ClassLoader.getSystemClassLoader() no longer returns an URLClassLoader on Java 9, but ClassLoaderUtil.getUserCodeClassLoaderInfo relies on this to extract information about the ClassLoader.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xleesf leesf
                Reporter:
                chesnay Chesnay Schepler
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m