Skip to content

test: refactor test-related helpers for gapic-generator-java for inclusion in testlib jar#1648

Merged
emmileaf merged 8 commits intomainfrom
gapic-test-jar-attached
May 11, 2023
Merged

test: refactor test-related helpers for gapic-generator-java for inclusion in testlib jar#1648
emmileaf merged 8 commits intomainfrom
gapic-test-jar-attached

Conversation

@emmileaf
Copy link
Contributor

@emmileaf emmileaf commented Apr 21, 2023

Motivation: In GoogleCloudPlatform/spring-cloud-gcp#1686, spring-cloud-gcp's code generator shares similar testing setup with gapic-generator-java and can benefit from test-scoped helper classes being also published as jar.

This PR takes the approach of creating an attached jar over a separate module (e.g. gapic-test), out of the two options described https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html.

  • This follows gax's approach to producing a testlib jar

For reviewers: Most code changes in the PR are from refactoring: to consolidate helper classes for gapic-generator-java tests under com.google.api.generator.test, and away from test classes themselves. Aside from package name changes in tests, the main file changes from refactoring and publishing the test jar are in pom.xml and gapic-generator-java/src/test/java/com/google/api/generator/test.

image

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Apr 21, 2023
@emmileaf emmileaf changed the title Refactor test-related helpers for gapic-generator-java for inclusion in testlib jar test: refactor test-related helpers for gapic-generator-java for inclusion in testlib jar Apr 21, 2023
@sonarqubecloud
Copy link

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@emmileaf emmileaf marked this pull request as ready for review May 10, 2023 21:39
@emmileaf emmileaf requested a review from a team May 10, 2023 21:39
@sonarqubecloud
Copy link

[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@emmileaf emmileaf requested review from blakeli0 and meltsufin May 10, 2023 21:46
@emmileaf emmileaf added the owlbot:run Add this label to trigger the Owlbot post processor. label May 10, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants