Skip to content

test: fix ITDatabaseAdminTest failures #2976

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 5 commits into from
Mar 26, 2024
Merged

test: fix ITDatabaseAdminTest failures #2976

merged 5 commits into from
Mar 26, 2024

Conversation

rahul2393
Copy link
Contributor

@rahul2393 rahul2393 commented Mar 26, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes test failures

If you write sample code, please follow the samples format.

@rahul2393 rahul2393 requested a review from a team as a code owner March 26, 2024 06:03
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: spanner Issues related to the googleapis/java-spanner API. labels Mar 26, 2024
@rahul2393 rahul2393 assigned olavloite and arpan14 and unassigned olavloite Mar 26, 2024
@rahul2393 rahul2393 requested a review from a team as a code owner March 26, 2024 06:06
ExecutionException e =
assertThrows(ExecutionException.class, () -> op.get(5, TimeUnit.MINUTES));
assertThat(e.getMessage()).contains("Invalid field mask");
SpannerException e = assertThrows(SpannerException.class, () -> op.get(5, TimeUnit.MINUTES));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure that the error that is returned by op.get() will be an ExecutionException, and not a SpannerException. However, the underlying cause of the ExecutionException should be a SpannerException.

(The build also fails because this assertion fails, as the returned exception is an ExecutionException).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I have fixed the asserts.

@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Mar 26, 2024
@rahul2393 rahul2393 requested a review from olavloite March 26, 2024 16:08
@rahul2393 rahul2393 merged commit fd08c12 into main Mar 26, 2024
@rahul2393 rahul2393 deleted the fix-test branch March 26, 2024 18:21
arpan14 pushed a commit to arpan14/java-spanner that referenced this pull request Apr 1, 2024
* test: fix ITDatabaseAdminTest failures

* 🦉 Updates from OwlBot post-processor

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

* exclude owlbot pre-processor run on kokoro config

* remove reduntant assert

* fix test

---------

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.

3 participants