Several JShell tests report JUnit discovery warnings

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 27
    • Component/s: tools

      During implementation of JDK-8365776, several utility methods were annotated with @Test. JUnit only executes test methods that return `void`, and the misplaced annotation now produces warnings:

      [WARNING] @Test method 'public java.lang.String ErrorTranslationTest.getKind(javax.tools.Diagnostic$Kind)' must not return a value. It will not be executed.
          Source: MethodSource [className = 'ErrorTranslationTest', methodName = 'getKind', methodParameterTypes = 'javax.tools.Diagnostic$Kind']
                  at ErrorTranslationTest.getKind(SourceFile:0)

      [WARNING] @Test method 'public jdk.jshell.JShell$Builder IdGeneratorTest.getBuilder()' must not return a value. It will not be executed.
          Source: MethodSource [className = 'IdGeneratorTest', methodName = 'getBuilder', methodParameterTypes = '']
                  at IdGeneratorTest.getBuilder(SourceFile:0)

       [WARNING] @Test method 'public java.io.File[] KullaCompletenessStressTest.getDirectoriesToTest()' must not return a value. It will not be executed.
          Source: MethodSource [className = 'KullaCompletenessStressTest', methodName = 'getDirectoriesToTest', methodParameterTypes = '']
                  at KullaCompletenessStressTest.getDirectoriesToTest(SourceFile:0)

      These warnings need to be fixed before CODETOOLS-7904125 can be implemented.

            Assignee:
            Unassigned
            Reporter:
            Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: