-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix or ignore broken JavadocParanamer tests #44
base: master
Are you sure you want to change the base?
Conversation
I don't think we can do |
What JDK version are you using with Maven? I'm seeing these test failures:
|
What it looks like is happening to me is that this copy is used solely for these unit tests — hence them being copied to the |
I built this on macOS 10.14.5 with Maven 3.8.2 & Java 8 using AdoptOpenJDK 1.8.0_282.
I'm seeing these errors as well, but they are already present in |
Note that these tests have been excluded from the Maven build for since 2010, which is probably a reason these breakages have gone undetected. Lines 80 to 99 in 03c538c
|
This fixes
JavadocParanamerTest
to once again succeed. The tests with a straightforward fix I fixed; the others I (hopefully temporarily) ignored.I changed the generated Javadoc artifact for the test to not include the version number in the file name. This removes the need to update the version number for each new release of Paranamer.
Note that some of the tests are still brittle in that they are dependent on externally hosted Javadocs. I have not tackled this as part of this PR, though I think improving those so the build doesn't fail if the hosted resources are down or missing in a future PR makes sense.
Newly ignored tests:
testLookupParameterNamesForConstructorWithStringArg
,testLookupParameterNamesForInterfaceMethod
— This was previously working with the 2.5.5 version of the Javadocs, presumably compiled under Java 5. This no longer works as the Javadoc regex no longer appears to match. I tried both the current version using Java 8, and the last released version using Java 7, and neither succeeded. Implementing Support Java 8+ in JavadocParanamer #39 should presumably fix these.dirParanamer
,fileParanamer
— These were broken by the removal of the Java SE Javadocs from source control, per Unidentified license issue #36. The real fix, IMO, would be to use something without any licensing issue. I think using a generated version of the Paranamer Javadocs instead of the Java SE Javadocs might be the simplest approach.javadocs3
,javadocs4
— Oracle no longer hosts these in navigable HTML form, but requires them to be downloaded from their archives. Unsure whether there's an easy way to salvage these directly. I think just hardcoding HTML in Javadoc 3/4 format in the test might be the easiest way to test these going forward (the same approach used inIssue39TestCase
. This approach should/could probably (also) be used for newer versions of the Javadocs, so the tests don't break in a similar manner if Oracle moves/removes them, or is temporarily down.