Several JShell tests report JUnit discovery warnings

XMLWordPrintable

    • b05

        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:
              Jan Lahoda
              Reporter:
              Daniel Jelinski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: