Anup,
Yes we should update our codebase to run tests on jdk11.
Please run tests on JDK14 (possibly JDK15rc) as well, if they run on jdk14
they will also run on jdk11

Answers inline below
Thanks
Cheers
Enrico

Il giorno dom 6 set 2020 alle ore 08:51 Anup Ghatage <ghat...@gmail.com> ha
scritto:

> Hi Bookies,
>
> I currently have a unique situation and wanted the community's advice on
> it.
> I have an older fork of the Bookkeeper repo which runs on JDK8 and I want
> to run with JDK11.
> Specifically I want to build Bookkeeper with JDK8 but run its unit tests
> with JDK11.
> Usually runtime JRE/JDK changes aren't that much of a big deal but running
> the unit tests often requires changes in the code as JDK11 doesn't support
> some of the things which were supported in JDK8.
>
> My first action was to upgrade Mockito to 3.0.0 and Powermock to 2.0.2
> which resolved around 60% of the errors.
>

+1 let's send a PR soon


> However, now I am left with the remaining 30% which are mainly of these
> types:
>
> 1.
> [ERROR] testTriggerAudit(org.apache.bookkeeper.bookie.BookieShellTest)
>  Time elapsed: 2.329 s  <<< ERROR!
> java.lang.IllegalAccessError: class javax.xml.parsers.FactoryFinder (in
> unnamed module @0x4b4a2fa8) cannot access class
> jdk.xml.internal.SecuritySupport (in module java.xml) because module
> java.xml does not export jdk.xml.internal to unnamed module @0x4b4a2fa8
> at
>
> org.apache.bookkeeper.bookie.BookieShellTest.setup(BookieShellTest.java:115)
>

probably it is a PowerMock issue, you have to use @PowerMockIgnore
annotation or something like that.



>
> 2.
> [ERROR]
>
> testGetLedgerManagerFactory(org.apache.bookkeeper.meta.zk.ZKMetadataDriverBaseTest)
>  Time elapsed: 0.002 s  <<< ERROR!
> java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.bookkeeper.conf.ClientConfiguration
> at
>
> org.apache.bookkeeper.meta.zk.ZKMetadataDriverBaseTest.setup(ZKMetadataDriverBaseTest.java:64)
>

Do you have the full stacktrace ? if it is a test that uses PowerMock it
probably the cure it the same as above

Enrico


>
> Any advice on what to do?
> I know Enrico and Sijie have worked on this before so appreciate any help
> from your experiences with this!
>
> Regards,
> Anup
>

Reply via email to