GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — spanner-jdbc: Add music sql script based integration tests by olavloite · Pull Request #6034 · googleapis/google-cloud-java

Conversation

@olavloite

@olavloite olavloite commented Aug 6, 2019

Copy link
Copy Markdown
Contributor

Adds SQL based integration tests for the Spanner JDBC driver based on the standard music data model.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olavloite
olavloite requested a review from kolea2 August 6, 2019 14:11
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 6, 2019
@codecov

codecov Bot commented Aug 6, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #6034 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6034      +/-   ##
============================================
+ Coverage     47.38%   47.38%   +<.01%     
+ Complexity    27197    27180      -17     
============================================
  Files          2523     2523              
  Lines        274599   274580      -19     
  Branches      31378    31380       +2     
============================================
- Hits         130123   130118       -5     
+ Misses       134863   134852      -11     
+ Partials       9613     9610       -3
Impacted Files Coverage Δ Complexity Δ
...e/cloud/bigtable/data/v2/BigtableDataSettings.java 34.78% <0%> (+1.44%) 3% <0%> (-1%) ⬇️
...gtable/admin/v2/BigtableInstanceAdminSettings.java 100% <0%> (+3.44%) 6% <0%> (ø) ⬇️
.../bigtable/admin/v2/BigtableTableAdminSettings.java 71.73% <0%> (+8.1%) 7% <0%> (-1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13fc06a...c06a6f5. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kolea2
kolea2 suggested changes Aug 7, 2019
View reviewed changes
Comment thread ...cloud-spanner-jdbc/src/test/resources/com/google/cloud/spanner/jdbc/ITSqlMusicScriptTest.sql Outdated
SET AUTOCOMMIT = FALSE;
SET TRANSACTION READ WRITE;

INSERT INTO Singers (SingerId, FirstName, LastName, SingerInfo, BirthDate) VALUES (1,'Marilyn','Lindsey',FROM_BASE64('iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAANGklEQVR4nOzXi6/X9X3H8R56RO222IsXqqgwGROYWuf9wnDipV7B0GmxYzWr9bKNqDGatraltop2ird1hTXrqvbMiChiylA7mCtQK4aySkstRiyFrLZQy5DCWaMz+yteSZPX4/EHvD4n3/NLnnkPzlg//l1JC68bjO6fc+LXo/sv3XhXdH/M7tXR/S0fGBndf23ei9H9WzYfG91fdtoHo/uzn70pun/YtrOi+zMvzv79x6xeHt1/e8yz0f1fjNoW3X9qbvb7jIiuA/A7SwAASgkAQCkBACglAAClBACglAAAlBIAgFICAFBKAABKCQBAKQEAKCUAAKUEAKCUAACUEgCAUgIAUEoAAEoJAEApAQAoJQAApQQAoJQAAJQSAIBSAgBQSgAASgkAQCkBACglAAClBACglAAAlBo89IZzow8c/uab0f1Hj389uv/YCxuj+19d/Ep0f9GmO6L7P7p/Q3T/H8/5fnT/rzbvju6/svaK6P45i7L/349svSq6v9+Ri6P7ixf9KLr/1BV/G90/deeHo/suAIBSAgBQSgAASgkAQCkBACglAAClBACglAAAlBIAgFICAFBKAABKCQBAKQEAKCUAAKUEAKCUAACUEgCAUgIAUEoAAEoJAEApAQAoJQAApQQAoJQAAJQSAIBSAgBQSgAASgkAQCkBACglAAClBACg1MAXdv44+sAXb18S3R+/eUJ0f++3hqP7p/7LtdH9bWsejO5/dvry6P4Hr50b3Z8/fFp0/4Sxfx/d3/ejg9H9vca9Gt0fumQgur/0kDOj+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FBKAABKCQBAKQEAKCUAAKUEAKCUAACUEgCAUgIAUGpw4iUfiz6wYtXY6P7s7zwf3d9xxZLo/titM6P7mz+R3Z8246Lo/jur1kf3D56+Mrp//u7d0f2Fd94f3b//6zui+xsn3xzdv3bH6dH9cXuOiO7f+p8jo/suAIBSAgBQSgAASgkAQCkBACglAAClBACglAAAlBIAgFICAFBKAABKCQBAKQEAKCUAAKUEAKCUAACUEgCAUgIAUEoAAEoJAEApAQAoJQAApQQAoJQAAJQSAIBSAgBQSgAASgkAQCkBACglAAClBACg1P8HAAD//+SLeeht2MttAAAAAElFTkSuQmCC'),DATE '1906-04-28');

@kolea2 kolea2 Aug 7, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Let's switch the BASE64 values to something generated by RandomResultSetGenerator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@olavloite olavloite Aug 7, 2019

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The BASE64 values have been replaced with generated random bytes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olavloite
olavloite force-pushed the spanner-jdbc-cleanup-it-jdbc-music-script branch from 93ee9d0 to d2f52c2 Compare August 7, 2019 07:19
@kolea2

kolea2 commented Aug 16, 2019

Copy link
Copy Markdown
Contributor

LGTM after rebase

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@olavloite
olavloite force-pushed the spanner-jdbc-cleanup-it-jdbc-music-script branch 2 times, most recently from b4e4b32 to 36948ce Compare August 17, 2019 06:13
@olavloite
olavloite requested a review from kolea2 August 17, 2019 14:43
kolea2
kolea2 suggested changes Aug 19, 2019
View reviewed changes
Comment thread ...le-cloud-spanner-jdbc/src/test/java/com/google/cloud/spanner/jdbc/ITAbstractSpannerTest.java Outdated
StringBuilder url = new StringBuilder("cloudspanner:/").append(getDatabase().getId().getName());
StringBuilder url = new StringBuilder("cloudspanner:");
if (getTestEnv().getTestHelper().getOptions().getHost() != null) {
url.append(getTestEnv().getTestHelper().getOptions().getHost().replace("https:", ""));

@kolea2 kolea2 Aug 19, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry just noticed this - should this be made consistent with the change we just merged for ITAbstractJdbcTest, or better yet - can we pull out this into a helper method?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kolea2 kolea2 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 19, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 19, 2019
olavloite added 10 commits August 20, 2019 16:40
@olavloite
add music sql script based tests
658c789
@olavloite
allow using custom host for integration tests
cf01adf
@olavloite
replace base64 data with random numbers
b98ce3d
@olavloite
run code formatter
fe76785
@olavloite
use random data
89c3c8c
@olavloite
fixed reference to wrong first name
85b0222
@olavloite
count nested aborts as successful retries
44e82b7
@olavloite
simplify assertion to prevent flaky failures
e2b0043
Simplify the assertion as the actual number of restarts of a transaction
cannot be determined for certain, as Cloud Spanner might abort any
transaction.
@olavloite
run code formatter
8fb30c6
@olavloite
move connection URL generation to util method
c06a6f5
@olavloite
olavloite force-pushed the spanner-jdbc-cleanup-it-jdbc-music-script branch from 381b050 to c06a6f5 Compare August 20, 2019 15:06
kolea2
kolea2 approved these changes Aug 20, 2019
View reviewed changes
@kolea2
kolea2 merged commit 8d280ac into googleapis:master Aug 20, 2019
This was referenced Aug 22, 2019
Release google-cloud-java v0.106.0 #6127
Closed
Release google-cloud-java v0.106.0 #6140
Merged
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
@olavloite @kolea2
spanner-jdbc: Add music sql script based integration tests (googleapi…
960124d
…s#6034)

* add music sql script based tests

* allow using custom host for integration tests

* replace base64 data with random numbers

* run code formatter

* use random data

* fixed reference to wrong first name

* count nested aborts as successful retries

* simplify assertion to prevent flaky failures

Simplify the assertion as the actual number of restarts of a transaction
cannot be determined for certain, as Cloud Spanner might abort any
transaction.

* run code formatter

* move connection URL generation to util method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@kolea2 kolea2 kolea2 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@olavloite @kolea2 @googlebot @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.