Skip to content

Conversation

@software-dov
Copy link
Contributor

Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.

As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.

Includes fragment tests and fixes for #413 and #414 as well as fragment tests for various other previously fixed issues.

Note: the parallelization of the fragment tests is currently a standalone commit and can be removed. It dramatically speeds up execution, however, since most of the time spent per fragment is waiting on I/O or subprocesses.

@software-dov software-dov requested a review from a team as a code owner October 29, 2021 23:20
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2021
Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.

As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.
Within a session, e.g. Python 3.9, all fragment GAPICs are generated
and tested concurrently.
Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

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

The golden files seem to need updating.

option java_package = "com.google.api";
option objc_class_prefix = "GAPI";

extend google.protobuf.MethodOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where are these proto files from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied them from googleapis and protobuf. My original idea was something complicated involving a hand-rolled semaphore/caching system to pull those repos as dependencies before running the fragment tests. I realized that was way too complicated, however, and just copied the three files I needed for these fragments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

2 participants