opencensus-java icon indicating copy to clipboard operation
opencensus-java copied to clipboard

Get test tree on java 8+

Open codefromthecrypt opened this issue 8 years ago • 5 comments

Unit tests help validate design choices. Notably #778 defines apis which might be useful for lambdas or even method references, but nuance is hard to see because we are limited to < java 8. If we were on java 8, we could practice the api against lambdas and method references with throwing signatures.

codefromthecrypt avatar Nov 17 '17 08:11 codefromthecrypt

Do you think that we should convert all unit tests to Java 8, or just add a few Java 8 test suites for the APIs that could use lambdas?

sebright2 avatar Aug 20 '18 22:08 sebright2

retrolambda the test source tree is an option if building with JDK 1.7 is required.

codefromthecrypt avatar Aug 31 '18 05:08 codefromthecrypt

Java8 is already added to Travis CI.

songy23 avatar Apr 26 '19 22:04 songy23

I'm not sure I understand. Does this mean that we don't need to build with Java 7 now, and we can change the source compatibility in build.gradle?

sebright2 avatar Apr 27 '19 02:04 sebright2

My apologies, I thought this issue was only about testing with Java8. If it's about adding test suites that are specific to Java8 syntax, then it's not yet resolved.

Does this mean that we don't need to build with Java 7 now, and we can change the source compatibility in build.gradle?

No, although we removed Java7 build from Travis CI, we still need to keep Java7 compatibility (reasons being https://github.com/census-instrumentation/opencensus-java/pull/1690#issuecomment-457956501).

songy23 avatar Apr 29 '19 16:04 songy23