Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

test: cleanup and speed up tests#4376

Merged
gcf-merge-on-green[bot] merged 1 commit intomainfrom
cleanup-tests
Mar 4, 2026
Merged

test: cleanup and speed up tests#4376
gcf-merge-on-green[bot] merged 1 commit intomainfrom
cleanup-tests

Conversation

@olavloite
Copy link
Copy Markdown
Collaborator

  • Speeds up the GapicSpannerRpcTest
  • Removes byte-buddy and the workaround for the slow mTLS check, as the underlying issue has been fixed

@olavloite olavloite requested review from a team as code owners March 4, 2026 15:34
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Mar 4, 2026
@olavloite olavloite requested a review from sakthivelmanii March 4, 2026 15:34
@olavloite olavloite added the automerge Merge the pull request once unit tests and other checks pass. label Mar 4, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the efficiency and cleanliness of the test suite. It achieves this by removing an outdated dependency and a temporary workaround that was no longer needed, directly leading to faster execution of critical tests. The changes streamline the testing environment and reduce unnecessary overhead.

Highlights

  • Test Performance Improvement: The GapicSpannerRpcTest has been optimized to run faster, contributing to overall test suite efficiency.
  • Dependency Cleanup: The byte-buddy dependency and its associated workaround for a slow mTLS check have been removed, as the underlying issue has been resolved.
Changelog
  • google-cloud-spanner/pom.xml
    • Removed byte-buddy and byte-buddy-agent test dependencies.
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractAsyncTransactionTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractMockServerTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractNettyMockServerTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplWithDefaultRWTransactionOptionsTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/DisableDefaultMtlsProvider.java
    • Removed the entire DisableDefaultMtlsProvider class.
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginTransactionTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/PgNumericTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadWriteTransactionWithInlineBeginTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/RequestIdMockServerTest.java
    • Removed call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java
    • Removed call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerThreadsTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/StandardBenchmarkMockServer.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionChannelHintTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/LocalConnectionCheckerTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
    • Removed import and call to disableDefaultMtlsProvider().
    • Updated test logic to use assertThrows for expected exceptions.
    • Configured ExecuteBatchDmlSettings with a short timeout to ensure faster test failures.
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GfeLatencyTest.java
    • Removed import and call to disableDefaultMtlsProvider().
  • google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SpannerRpcMetricsTest.java
    • Removed import and call to disableDefaultMtlsProvider().
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the byte-buddy dependency and the associated workaround for a slow mTLS check, which as per the description is no longer needed. This cleanup is applied consistently across numerous test files by removing the DisableDefaultMtlsProvider class and its usages. Additionally, GapicSpannerRpcTest is refactored to improve its speed by configuring RPC timeouts to fail faster, and test reliability by using assertThrows instead of try-catch blocks. The changes align with the pull request's stated goals.

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2026
@gcf-merge-on-green gcf-merge-on-green Bot merged commit f707be4 into main Mar 4, 2026
33 checks passed
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 4, 2026
@gcf-merge-on-green gcf-merge-on-green Bot deleted the cleanup-tests branch March 4, 2026 16:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants