Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate Gapic-Generator-Java to JUnit5 #2771

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

lqiu96
Copy link
Contributor

@lqiu96 lqiu96 commented May 14, 2024

Fixes: #2725

Scope

This only modifies the unit tests inside the gapic-generator-java module. It does not modify the generated unit tests output from the generator. JUnit4 is still needed with default scope as it's used to generate the unit tests from the TestComposer:

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>

Changes

  • Change the scope for Unit Tests from public to package-private
  • Parameterized tests updated to use @ParameterizedTests
  • Import updated to org.junit.jupiter.api.*

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label May 14, 2024
@lqiu96 lqiu96 added the owlbot:run Add this label to trigger the Owlbot post processor. label May 15, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label May 15, 2024
gapic-generator-java/pom.xml Outdated Show resolved Hide resolved
@lqiu96 lqiu96 marked this pull request as ready for review May 15, 2024 18:21
@lqiu96 lqiu96 requested a review from a team as a code owner May 15, 2024 18:21
@lqiu96 lqiu96 requested a review from alicejli May 16, 2024 20:31
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@lqiu96 lqiu96 merged commit 94ef4f4 into main May 17, 2024
33 checks passed
@lqiu96 lqiu96 deleted the gapic-generator-junit5 branch May 17, 2024 17:13
lqiu96 added a commit that referenced this pull request May 22, 2024
Fixes: #2725

# Scope
This *only* modifies the unit tests inside the gapic-generator-java
module. It does not modify the generated unit tests output from the
generator. JUnit4 is still needed with default scope as it's used to
generate the unit tests from the TestComposer:
https://github.com/googleapis/sdk-platform-java/blob/96e6626eb2dda867b5d8d81f3ec706b5a995a3c2/gapic-generator-java/pom.xml#L446-L450

# Changes
- Change the scope for Unit Tests from public to package-private
- Parameterized tests updated to use `@ParameterizedTests`
- Import updated to `org.junit.jupiter.api.*`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Junit 4 to Junit 5: gapic-generator-java
4 participants