JUnit test java/util/zip/ZipFile/ZipFileInputStreamSkipTest.java uses private methods for BeforeAll/AfterAll

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: core-libs

      The following failure was noticed for java/util/zip/ZipFile/ZipFileInputStreamSkipTest.java after the recent upgrade of jtreg in the JDK repo. The newer jtreg version enforces test failures for such warnings in JUnit tests.

      org.junit.platform.launcher.core.DiscoveryIssueException: TestEngine with ID 'junit-jupiter' encountered 2 critical issues during test discovery:

      (1) [WARNING] @BeforeAll method 'private static void ZipFileInputStreamSkipTest.createZip() throws java.io.IOException' should not be private. This will be disallowed in a future release.
          Source: MethodSource [className = 'ZipFileInputStreamSkipTest', methodName = 'createZip', methodParameterTypes = '']
                  at ZipFileInputStreamSkipTest.createZip(SourceFile:0)

      (2) [WARNING] @AfterAll method 'private static void ZipFileInputStreamSkipTest.cleanUp() throws java.io.IOException' should not be private. This will be disallowed in a future release.
          Source: MethodSource [className = 'ZipFileInputStreamSkipTest', methodName = 'cleanUp', methodParameterTypes = '']
                  at ZipFileInputStreamSkipTest.cleanUp(SourceFile:0)
      JavaTest Message: JUnit Platform Failure(s): 1

            Assignee:
            Jaikiran Pai
            Reporter:
            Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: