gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

Migrate Junit 4 to Junit 5: gax-java

Open blakeli0 opened this issue 2 years ago • 1 comments

Junit 5 provides a lot of new features(namely Precise exception handling, RepeatedTest etc.) that could be useful to us, it requires Java 8 to be the minimum runtime version, now that Java 8 is the minimum supported version for GAPIC, we can follow the migration guide to modernize our testing infra. We can start with all the handwritten code in this repo, and expand to google-cloud-java and eventually handwritten libraries.

blakeli0 avatar Apr 06 '23 18:04 blakeli0

One additional benefit of JUnit 5 from this implementation: https://github.com/googleapis/sdk-platform-java/pull/2485

JUnit 4 doesn't have support for setting Environmental Variables inside tests. JUnit 5 has an extension pack which allows setting and clearing the env vars: https://junit-pioneer.org/docs/environment-variables/

lqiu96 avatar Feb 28 '24 23:02 lqiu96