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

Commit 07a00f9

Browse files
committed
More test plumbing
1 parent 3e47760 commit 07a00f9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tests/unit/test_batch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ def test_commit_ok(self):
259259
[
260260
("google-cloud-resource-prefix", database.name),
261261
("x-goog-spanner-route-to-leader", "true"),
262+
(
263+
"x-goog-spanner-request-id",
264+
f"1.{REQ_RAND_PROCESS_ID}.{database._nth_client_id}.1.1.1",
265+
)
262266
],
263267
)
264268
self.assertEqual(request_options, RequestOptions())
@@ -577,6 +581,10 @@ def _test_batch_write_with_request_options(
577581
[
578582
("google-cloud-resource-prefix", database.name),
579583
("x-goog-spanner-route-to-leader", "true"),
584+
(
585+
"x-goog-spanner-request-id",
586+
f"1.{REQ_RAND_PROCESS_ID}.{database._nth_client_id}.1.1.1",
587+
),
580588
],
581589
)
582590
if request_options is None:

tests/unit/test_database.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ def _execute_partitioned_dml_helper(
12041204
("x-goog-spanner-route-to-leader", "true"),
12051205
(
12061206
"x-goog-spanner-request-id",
1207-
f"1.{REQ_RAND_PROCESS_ID}.{_Client.NTH_CLIENT.value}.1.1.1",
1207+
f"1.{REQ_RAND_PROCESS_ID}.{database._nth_client_id}.{database._channel_id}.1.1",
12081208
),
12091209
],
12101210
)
@@ -3217,6 +3217,7 @@ def __init__(
32173217
self.directed_read_options = directed_read_options
32183218
self._nth_client_id = _Client.NTH_CLIENT.increment()
32193219
self._nth_request = AtomicCounter()
3220+
self.credentials = {}
32203221

32213222
@property
32223223
def _next_nth_request(self):

0 commit comments

Comments
 (0)