Skip to content
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

test: fix mock server ARRAY<BYTES> parameter cast #2344

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

olavloite
Copy link
Collaborator

The recent change that made decoding BYTES and ARRAY lazy did not update all code paths in the mock Spanner server that is used for testing. This meant that tests that tried to use ARRAY query parameters would run into a ClassCastException. This problem only occurs in (internal) test code and does not affect user code.

The recent change that made decoding BYTES and ARRAY<BYTES> lazy did not
update all code paths in the mock Spanner server that is used for testing.
This meant that tests that tried to use ARRAY<BYTES> query parameters would
run into a ClassCastException. This problem only occurs in (internal) test
code and does not affect user code.
@olavloite olavloite requested a review from a team as a code owner March 21, 2023 12:24
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 21, 2023
@olavloite olavloite requested a review from arpan14 March 21, 2023 12:24
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Mar 21, 2023
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner March 21, 2023 12:27
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.36.1"
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.38.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Query - Are these versions manually updated? Or is there an automated way of maintaining this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those are automatic updates from the OwlBot (see 9ce2e8b)

@olavloite olavloite merged commit a0249e5 into main Mar 23, 2023
@olavloite olavloite deleted the mock-server-array-of-bytes branch March 23, 2023 16:52
arpan14 pushed a commit to arpan14/java-spanner that referenced this pull request Apr 28, 2023
* test: fix mock server ARRAY<BYTES> parameter cast

The recent change that made decoding BYTES and ARRAY<BYTES> lazy did not
update all code paths in the mock Spanner server that is used for testing.
This meant that tests that tried to use ARRAY<BYTES> query parameters would
run into a ClassCastException. This problem only occurs in (internal) test
code and does not affect user code.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
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. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants