curator icon indicating copy to clipboard operation
curator copied to clipboard

Test with JDK 17. Update Mockito and JUnit 5.x

Open martin-g opened this issue 2 years ago • 7 comments

Continuation of #407 I will rebase it to master once #407 is merged!

martin-g avatar Feb 25 '22 18:02 martin-g

https://github.com/apache/curator/pull/410/commits/f6bac3372130882ee1991b087283842f542474ad "fixes" the problem in org.apache.curator.framework.imps.GzipCompressionProvider but it does not look nice. I'd recommend a deeper look here!

martin-g avatar Feb 25 '22 22:02 martin-g

Now the build on JDK 17 fails due to Jersey. https://github.com/apache/curator/blob/fe50da4904aa4ca4f51b473ad298ae664358ff3c/pom.xml#L84-L86 says that it is not worth it to upgrade.

martin-g avatar Feb 28 '22 10:02 martin-g

I am +1 to upgrading Jersey. That comment (https://stackoverflow.com/questions/17098341#22033825) is very old.

Also I am not sure about why we are using Jersey in Curator... do you want to try to upgrade please ?

eolivelli avatar Feb 28 '22 10:02 eolivelli

Also I am not sure about why we are using Jersey in Curator... do you want to try to upgrade please ?

It is used only in curator-x-discovery-server/src/test/java/org/apache/curator/x/discovery/server/jetty_jersey/TestMapsWithJersey.java

Is it valueable ? Should I try to upgrade it or just delete it ?

martin-g avatar Feb 28 '22 10:02 martin-g

Is it valueable ? Should I try to upgrade it or just delete it ?

if we can keep the existing tests it is better, and it would be great to convert the test

that said, I am not sure about the real value of that test maybe @Randgalt or @cammckenzie know better than me.

eolivelli avatar Feb 28 '22 10:02 eolivelli

I've updated Jersey to it latest 2.x version but there is still some problem - the MapDiscoveryContext is not seen as a @Provider and org.apache.curator.x.discovery.server.jetty_jersey.MapDiscoveryResource's constructor fails with a NPE. I'll try to debug it later.

martin-g avatar Feb 28 '22 14:02 martin-g

@martin-g code conflict. If you'd like to move forward this effort, please rebase the commits so that I can give a review.

tisonkun avatar Apr 30 '22 05:04 tisonkun

It seems tests failed steadily.

tisonkun avatar Aug 29 '22 14:08 tisonkun