Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8319444

Unhelpful failure output in TestLegalNotices

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 22
    • tools
    • None

    Description

      This assertion in TestLegalNotices only records the test case result for passing test cases. It should have a corresponding call to JavadocTester#failed if the case fails:

      https://github.com/openjdk/jdk/blob/df599dbb9b0f0ee96d1ec767ac8821f164ab075d/test/langtools/jdk/javadoc/doclet/testLegalNotices/TestLegalNotices.java#L112-L114

      Without the call to failed, the test case output looks like:

      Starting subtest 1.5: Checking legal notice files
      Expected: []
         Found: [ADDITIONAL_LICENSE_INFO, ASSEMBLY_EXCEPTION, LICENSE, jquery.md, jqueryUI.md]

      And the failure isn't indicated until the end of the test log:

      java.lang.Error: 4 of 58 subtests failed, in 8 runs of javadoc

      With the missing call to 'failed', the test case failure is more obvious:

      Starting subtest 1.5: Checking legal notice files
      Expected: []
         Found: [ADDITIONAL_LICENSE_INFO, ASSEMBLY_EXCEPTION, LICENSE, jquery.md, jqueryUI.md]
      FAILED: Did not find all expected files
              at TestLegalNotices.test(TestLegalNotices.java:115)
              at TestLegalNotices.testCombo(TestLegalNotices.java:74)
              at javadoc.tester.JavadocTester.runTest(JavadocTester.java:447)

      Attachments

        Issue Links

          Activity

            People

              cushon Liam Miller-Cushon
              cushon Liam Miller-Cushon
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: