Skip to content

Spanner p0 system tests (batch #1) - #3599

Closed
tseaver wants to merge 4 commits into
masterfrom
spanner-systest-p0-tests-1
Closed

tseaver wants to merge 4 commits into
masterfrom
spanner-systest-p0-tests-1

Conversation

@tseaver

@tseaver tseaver commented Jul 11, 2017

Copy link
Copy Markdown
Contributor

Additional systests for Snapshot.read:

  • Read single key.
  • Read multiple keys.
  • Read open-closed ranges.
  • Read open-open ranges.
  • Read closed-open ranges.
  • Read closed-closed ranges.

Additional system test for Snapshot.execute_sql:

  • Query returning ARRAY<STRUCT>.
  • Bind INT64 parameter to null.

@tseaver tseaver added api: spanner Issues related to the Spanner API. testing labels Jul 11, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 11, 2017

@dhermes dhermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks mostly OK, just a few comments that are "orthogonal" to the content

Comment thread spanner/tests/system/test_system.py Outdated
self.TABLE, self.COLUMNS, KeySet(keys=[(0,)])))

all_data_rows = list(self._row_data(ROW_COUNT))
expected = all_data_rows[:1]

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

[(row[0], row[2]) for row in self._row_data(ROW_COUNT)]))
self._check_row_data(rows, expected)

def test_read_w_single_key(self):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

keyset = KeySet(ranges=(closed_closed,))
rows = list(snapshot.read(
self.TABLE, self.COLUMNS, keyset))
expected = all_data_rows[START:END+1]

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

keyset = KeySet(ranges=(open_open,))
rows = list(snapshot.read(
self.TABLE, self.COLUMNS, keyset))
expected = all_data_rows[START+1:END]

This comment was marked as spam.

keyset = KeySet(ranges=(open_closed,))
rows = list(snapshot.read(
self.TABLE, self.COLUMNS, keyset))
expected = all_data_rows[START+1:END+1]

This comment was marked as spam.

snapshot = session.snapshot(read_timestamp=committed)
all_data_rows = list(self._row_data(ROW_COUNT))

closed_closed = KeyRange(start_closed=[START], end_closed=[END])

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread spanner/tests/system/test_system.py Outdated

snapshot = session.snapshot(read_timestamp=committed)
rows = list(snapshot.read(
self.TABLE, self.COLUMNS, KeySet(keys=[(0,), (1,), (2,)])))

This comment was marked as spam.

"SELECT ARRAY(SELECT AS STRUCT C1, C2 "
"FROM (SELECT 'a' AS C1, 1 AS C2 "
"UNION ALL SELECT 'b' AS C1, 2 AS C2) "
"ORDER BY C1 ASC)"

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

tseaver added 4 commits July 12, 2017 16:38
- Read single key.
- Read multiple keys.
- Read open-closed ranges.
- Read open-open ranges.
- Read closed-open ranges.
- Read closed-closed ranges.
- Query returning 'ARRAY<STRUCT>'.
@tseaver
tseaver force-pushed the spanner-systest-p0-tests-1 branch from 804590c to 9aefd29 Compare July 12, 2017 20:42
@tseaver

tseaver commented Jul 12, 2017

Copy link
Copy Markdown
Contributor Author

@dhermes, @lukesneeringer I had to cherry-pick 474cb18 into the PR because the back-end suddenly began including instance configs for zones (e.g., asia-east1) where my account is not permitted to create instances.

@lukesneeringer

Copy link
Copy Markdown
Contributor

@dhermes, @lukesneeringer I had to cherry-pick 474cb18 into the PR because the back-end suddenly began including instance configs for zones (e.g., asia-east1) where my account is not permitted to create instances.

Ack. No worries.

@tseaver

tseaver commented Jul 12, 2017

Copy link
Copy Markdown
Contributor Author

Merged via #3604

@tseaver tseaver closed this Jul 12, 2017
@tseaver
tseaver deleted the spanner-systest-p0-tests-1 branch July 24, 2017 19: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 Spanner API. cla: yes This human has signed the Contributor License Agreement. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants