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

fix: read time should be used for transaction reads #1171

Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b66827e
Allow datastore projectId to be fetched from clien
danieljbruce Sep 7, 2023
684c469
Create a file for mocking out commits
danieljbruce Sep 20, 2023
1ec6ed2
Create a test to measure latency of call.
danieljbruce Sep 21, 2023
40213ca
Run the linting fixes
danieljbruce Sep 21, 2023
57e3b13
Add license header to top of test file
danieljbruce Sep 21, 2023
af56d91
Add comment for test for now
danieljbruce Sep 21, 2023
72f9492
Add a test for the mock server
danieljbruce Sep 22, 2023
194e109
Set current retry attempt to 0
danieljbruce Sep 22, 2023
22d5f54
Add a log for call time
danieljbruce Sep 22, 2023
81f5956
Add another mock
danieljbruce Sep 25, 2023
dc9dbb7
Eliminate code from the mock file
danieljbruce Oct 13, 2023
0ad0a57
Start off by adding read time to read options
danieljbruce Oct 13, 2023
e795c3a
Update the test to use transactions
danieljbruce Oct 13, 2023
851877c
Remove only
danieljbruce Oct 13, 2023
b9bfd79
Remove the before hook
danieljbruce Oct 13, 2023
617b013
Remove unnecessary cherry picked files
danieljbruce Oct 13, 2023
4a32ad3
Clean up PR diff
danieljbruce Oct 13, 2023
8f74353
clean up PR diff
danieljbruce Oct 13, 2023
4c9445c
Update the test so that it is run as a transaction
danieljbruce Oct 18, 2023
32729e1
Add an integration test
danieljbruce Oct 18, 2023
6ef2800
Merge branch 'main' of https://github.com/googleapis/nodejs-datastore…
danieljbruce Oct 30, 2023
1354b47
Linting fixing indents
danieljbruce Oct 30, 2023
80ca7ec
Merge branch 'main' into not-use-read-time-for-run-tx
danieljbruce Apr 4, 2024
136f1b7
Update the header
danieljbruce Apr 4, 2024
280244d
Merge branch 'not-use-read-time-for-run-tx' of https://github.com/dan…
danieljbruce Apr 4, 2024
95d0d54
Fix unit test
danieljbruce Apr 4, 2024
aa4f125
System test changes.
danieljbruce Apr 4, 2024
b78b091
Modify test
danieljbruce Apr 4, 2024
cc72220
Replace with less precise assert
danieljbruce Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the test so that it is run as a transaction
Right now, providing a transaction id is necessary to run the request as a transaction.
  • Loading branch information
danieljbruce committed Oct 18, 2023
commit 4c9445c2c976e8c114ada68535a02fe57b50d8ee
4 changes: 3 additions & 1 deletion test/gapic-mocks/runQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ describe('Run Query', () => {
}

it('should pass read time into runQuery for transactions', async () => {
const id = 'test-id';
setRunQueryComparison(
(request: protos.google.datastore.v1.IRunQueryRequest) => {
assert.deepStrictEqual(request, {
readOptions: {
transaction: id,
readTime: {
seconds: 77,
},
Expand All @@ -89,7 +91,7 @@ describe('Run Query', () => {
});
}
);
const transaction = datastore.transaction();
const transaction = datastore.transaction({id});
const query = datastore.createQuery('Task');
await transaction.runQuery(query, {readTime: 77000});
});
Expand Down
Loading