Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

[gax-java] chore: include only external-facing gax testing utils in testlibJar #1120

Merged
merged 2 commits into from Jun 5, 2020

Conversation

miraleung
Copy link
Contributor

@miraleung miraleung commented Jun 5, 2020

This PR fixes #700 by removing unit tests from the testlib and sources jar. On doing ./gradlew testlibJar, I now see only the following files in the resulting {gax,gax-grpc,gax-httpjson}-1.56.0.testlib.jar files:

com/google/api/gax/grpc/testing/**
com/google/api/gax/httpjson/testing/**
com/google/api/gax/rpc/testing/**

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 5, 2020
@miraleung miraleung linked an issue Jun 5, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #1120 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1120   +/-   ##
=========================================
  Coverage     78.72%   78.72%           
  Complexity     1169     1169           
=========================================
  Files           204      204           
  Lines          5184     5184           
  Branches        416      416           
=========================================
  Hits           4081     4081           
  Misses          928      928           
  Partials        175      175           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acf1fec...3d14e3c. Read the comment docs.

@@ -190,6 +190,10 @@ subprojects {
task testlibJar(type: Jar, dependsOn: test) {
classifier = 'testlib'
from sourceSets.test.output

include('com/google/api/gax/rpc/testing/**')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How exactly to define the external-facing gax testing utils here? I see this puts only the "testing" subfolders, but is that it? There are other infrastructure classes, which are not in testing subfodlers. For example com.google.api.gax.core.FakeApiClock or com.google.api.gax.rpc.AccumulatingStreamObserver.

Also, does this solve the other part of the issue (missing source files in the artifact)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elharo to confirm whether the external-facing utils are limited to the testing packages.

The testlib sources are already in the sources jar, but I've added something to strip out unit tests as well.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this fix a bug? If so, add it to the PR description.

@miraleung
Copy link
Contributor Author

Done, and this PR is already linked to issue #700.

@miraleung miraleung merged commit bbd3960 into master Jun 5, 2020
@miraleung miraleung deleted the fixit/testlib branch June 5, 2020 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up testlib artifact
4 participants