Unhelpful failure output in TestLegalNotices

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 22
    • Component/s: tools
    • None

      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)

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

              Created:
              Updated:
              Resolved: