Skip to content

chore: configure backups test to run in nightly build #1409

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

Merged
merged 8 commits into from
Sep 6, 2021

Conversation

thiagotnunes
Copy link
Contributor

@thiagotnunes thiagotnunes commented Sep 6, 2021

The main change of this PR is to move the ITBackupTest into a new JUnit category to be executed only on the nightly builds. This is because the Backup test is slow and flaky when executing several in parallel (due to RESOURCE_EXHAUSTED issues). We have done the following here:

  1. Created a new JUnit category: SlowTest
  2. Created a new JUnit category: SerialIntegrationTest
  3. Removed unused categories FlakyTest
  4. Made SlowTest, SerialIntegrationTest and ParallelIntegrationTest extend the IntegrationTest category (in order to make configuration easier)
  5. Created a new profile in the pom.xml to run only the SlowTest tests
  6. Created a kokoro configuration file to execute the slow tests

Addresses #1336

Add a new JUnit category: SlowTest. It will be used to execute tests
that are part of the nightly build.
Also refactors the categories hierarchy to be easier to setup.
Configures a profile to execute only the slow tests. It will be invoked
in the nightly build.
Sets up the kokoro configuration for running slow tests nightly
@thiagotnunes thiagotnunes requested review from a team as code owners September 6, 2021 05:38
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • .kokoro/build.sh

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Sep 6, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2021
<id>default-test</id>
<configuration>
<excludedGroups>com.google.cloud.spanner.TracerTest,com.google.cloud.spanner.IntegrationTest</excludedGroups>
<excludedGroups>com.google.cloud.spanner.categories.TracerTest,com.google.cloud.spanner.categories.IntegrationTest</excludedGroups>
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably need to change the package name for TracerTest further below as well (line 62)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, thanks, fixed it.

</configuration>
</execution>
<execution>
<id>parallel-integration-test</id>
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the intention with this execution? The name seems to indicate that it will execute parallel integration tests, but if I understand the configuration correctly, it will just skip all tests. Could we maybe add a comment to this section to explain why it's here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because the default configuration (line 88-98) defines an execution for the integration-test goal with such id. Thus, we need to override it in the slow tests profile to NOOP, otherwise the tests with the category ParallelIntegrationTest will be executed (as per the default one). I added a comment in this section.

@thiagotnunes thiagotnunes merged commit 87b77a3 into master Sep 6, 2021
@thiagotnunes thiagotnunes deleted the backups-nightly branch September 6, 2021 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants