| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…add unit-vintage-engine.
There was a problem hiding this comment.
LGTM. Added a few nits. If you could test them locally and see if they work.
Sorry, something went wrong.
|
Since Min is OOO, I will take a look a final few things for this issue and merge if everything else looks fine. |
Sorry, something went wrong.
[INFO] --- maven-failsafe-plugin:3.2.5:integration-test (default) @ gapic-showcase --- [INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 Looks like the ITs aren't actually running. |
Sorry, something went wrong.
|
I see it is running the tests now: [INFO] --- clirr-maven-plugin:2.8:check (default) @ gapic-showcase --- [INFO] Skipping execution [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for GAPIC Showcase Client Core Parent 0.0.1-SNAPSHOT: [INFO] [INFO] GAPIC Showcase Client Core Parent .................. SUCCESS [ 2.109 s] [INFO] proto-gapic-showcase-v1beta1 ....................... SUCCESS [ 1.008 s] [INFO] grpc-gapic-showcase-v1beta1 ........................ SUCCESS [ 2.228 s] [INFO] GAPIC Showcase Client .............................. SUCCESS [01:39 min] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:45 min [INFO] Finished at: 2024-05-17T19:11:27Z [INFO] ------------------------------------------------------------------------ |
Sorry, something went wrong.
| <groupId>org.junit</groupId> | ||
| <artifactId>junit-bom</artifactId> | ||
| <version>5.10.2</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> |
There was a problem hiding this comment.
As this doesn't inherit from shared-deps or pom-parent, we declare the version here.
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Sorry, something went wrong.
| <artifactId>maven-failsafe-plugin</artifactId> | ||
| <!-- Shared-Configs defines JUnit Provider 4.7 as default: https://github.com/googleapis/java-shared-config/blob/465bb399aef9aa8383f11c23f10a97df49c1d057/java-shared-config/pom.xml#L86-L92 --> | ||
| <!-- Override it here for showcase only as other libraries may still be reliant on JUnit4 --> | ||
| <dependencies> |
There was a problem hiding this comment.
Do we know why the integration tests would not run without this change?
Sorry, something went wrong.
There was a problem hiding this comment.
I believe it's due the failsafe using junit-provider 4.7 (which works for junit 4.7+) as the selected provider instead of junit-platform: https://maven.apache.org/surefire/maven-failsafe-plugin/examples/junit-platform.html#provider-selection
Sorry, something went wrong.
fixes #2728, attempt to remove Junit 4 support after migration. Other than POM dependency migrate, changes include: - package name changes - Junit 5 syntax upgrades, e.g. `@Before` --> `@BeforeEach`, Replace assertion methods - remove public modifier on tests and test classes. - Refactor JUnit 4 TemporaryFolder `@Rule` in [ITGdch.java](https://github.com/googleapis/sdk-platform-java/pull/2757/files#diff-6ae7755a0b038e1a2febae2d27e36c762f6751b8c7db577421667069399884b4) to JUnit 5 `@TempDir` - Replace `@Test(timeout = 15000L)` in [ITClientShutdown.java](https://github.com/googleapis/sdk-platform-java/pull/2757/files#diff-70d1df57471178a7a63302f82e4a4855ffbbd642ea67d92d501bd1f7008957ca) with `@Timeout(15)` - Update `@RunWith(Parameterized.class)` test in [ITHttpAnnotation.java](https://github.com/googleapis/sdk-platform-java/pull/2757/files#diff-03d420650ecc9fe78ad4887761043c4fdceaa978f464ce30cfc4ed5f8be9b64d) to `@ParameterizedTest` with `@MethodSource("data")` ~~Note: #2737 creates a new test class with JUnit4 syntax. Depending on merging order, I will either update in this pr, or #2737.~~ Updated. Due to truth library depending on junit 4 ([see issue](google/truth#333)), junit 4 cannot be completely removed, or will encounter `java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener` running tests with maven surefire. To keep things cleaner, excluding the implicitly junit brought in from truth and `junit-vintage-engine`. We could also do the reverse, and make a comment if that's prefered. --------- Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com> Co-authored-by: Lawrence Qiu <lawrenceqiu@google.com>
| Back | FazBrowse Home | New Git URL |
fixes #2728, attempt to remove Junit 4 support after migration.
Other than POM dependency migrate, changes include:
Note: #2737 creates a new test class with JUnit4 syntax. Depending on merging order, I will either update in this pr, or #2737. Updated.
Due to truth library depending on junit 4 (see issue), junit 4 cannot be completely removed, or will encounter java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener running tests with maven surefire. To keep things cleaner, excluding the implicitly junit brought in from truth and junit-vintage-engine. We could also do the reverse, and make a comment if that's prefered.