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

feat: Support for using multiple databases in datastore #1090

Merged
merged 75 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
11524c1
A simple test with multidb support
danieljbruce Mar 20, 2023
e06bee0
A simple test with multidb support
danieljbruce Mar 20, 2023
1f464a5
Merge branch 'multi-db' of https://github.com/danieljbruce/nodejs-dat…
danieljbruce Mar 20, 2023
10da9c8
Add additional checks with get
danieljbruce Mar 20, 2023
ecfce7d
Add a test for saving with another database
danieljbruce Mar 20, 2023
3b6a42c
other datastore should delete the entity
danieljbruce Mar 20, 2023
e254be5
Add a test for the getDatastore method
danieljbruce Mar 20, 2023
77970c8
Add a unit test for database id
danieljbruce Mar 20, 2023
3b86ce2
Do an additional check for the sake of tests
danieljbruce Mar 20, 2023
ea54946
initialize generated client so it can be mocked
danieljbruce Mar 20, 2023
38d955c
comments and setDatabaseId
danieljbruce Mar 21, 2023
57bc2eb
Refactor of database name
danieljbruce Mar 21, 2023
c9856b2
correction to test against old database
danieljbruce Mar 21, 2023
543e486
getRequestWithDatabaseId function
danieljbruce Mar 22, 2023
dde1eba
Change function name to addDatabaseIdToRequest
danieljbruce Mar 22, 2023
8ba512a
Comments in all the places to add reqOpts
danieljbruce Mar 22, 2023
de946b2
Add a warning to a certain test for easier debug
danieljbruce Mar 22, 2023
dd7b06c
This fixed the bug for the save operation
danieljbruce Mar 22, 2023
f167ce3
datastore request id
danieljbruce Mar 22, 2023
364845b
addDatabaseIdToRequest
danieljbruce Mar 22, 2023
7b5f902
Solve all the test errors for createReadStream
danieljbruce Mar 22, 2023
a3bdb92
addDatabaseIdToRequest mock for runQueryStream
danieljbruce Mar 22, 2023
9d7fab1
By default, mock out addDatabaseIdToRequest
danieljbruce Mar 22, 2023
d9a96bf
Revert "addDatabaseIdToRequest mock for runQueryStream"
danieljbruce Mar 22, 2023
7543f57
Revert "Solve all the test errors for createReadStream"
danieljbruce Mar 22, 2023
3f3e965
linting
danieljbruce Mar 23, 2023
32bb92b
Revert "datastore request id"
danieljbruce Mar 23, 2023
92f8778
Revert "This fixed the bug for the save operation"
danieljbruce Mar 23, 2023
6159882
Revert "Comments in all the places to add reqOpts"
danieljbruce Mar 23, 2023
9410652
Introduce addDatabaseIdRequest in request
danieljbruce Mar 23, 2023
b34bf17
Declare a constant so that tests don’t run
danieljbruce Mar 23, 2023
2e1999a
Remove setDatabaseId
danieljbruce Mar 28, 2023
bd97d00
Add comment for addDatabaseIdToRequest function
danieljbruce Mar 28, 2023
d41ca60
Address header issue
danieljbruce Mar 28, 2023
1519ad3
Merge branch 'main' of https://github.com/googleapis/nodejs-datastore…
danieljbruce Mar 28, 2023
0ebabd5
Add databaseId for encoding and decoding keys
danieljbruce Mar 28, 2023
6449d10
Revert "Add databaseId for encoding and decoding keys"
danieljbruce Mar 29, 2023
e9ee522
Try a test with the namespace
danieljbruce Mar 29, 2023
1ba9756
Use the other datastore in the test
danieljbruce Mar 29, 2023
d35cdee
Create a test that looks at specific details
danieljbruce Mar 29, 2023
769417d
Add additional checks to existing test
danieljbruce Mar 29, 2023
e694341
Revert "Revert "Add databaseId for encoding and decoding keys""
danieljbruce Mar 29, 2023
f307f4d
Revert "Revert "Revert "Add databaseId for encoding and decoding keys"""
danieljbruce Mar 29, 2023
0f27ea4
Merge branch 'main' of https://github.com/googleapis/nodejs-datastore…
danieljbruce Mar 31, 2023
76a3dfc
Rename the second database to secondDatabase
danieljbruce May 10, 2023
3fd19fb
Use the database called multidb-test
danieljbruce May 19, 2023
d4e3f91
Merge branch 'main' into multi-db
danieljbruce May 31, 2023
771390c
Eliminate function on index that adds the id
danieljbruce Jun 9, 2023
ae15bc4
Fix the test so that the assertion error bubbles
danieljbruce Jun 9, 2023
6b5c542
Merge branch 'main' into multi-db
danieljbruce Jun 9, 2023
da64dab
Add types so that purpose of function is clear
danieljbruce Aug 8, 2023
8d170fd
Merge branch 'main' into multi-db
danieljbruce Aug 14, 2023
d49e5fc
Add types and names so that the function works
danieljbruce Aug 14, 2023
e7082ab
Merge branch 'multi-db' of https://github.com/danieljbruce/nodejs-dat…
danieljbruce Aug 14, 2023
b50b065
Eliminate repeated code fragments
danieljbruce Aug 15, 2023
f3aadc2
Better names and code organization
danieljbruce Aug 15, 2023
65605e8
Change the variable name of the default key
danieljbruce Aug 15, 2023
6986d4c
Refactor the post key hierarchy out
danieljbruce Aug 15, 2023
0378dea
Add only to the test we are interested in
danieljbruce Aug 18, 2023
a190512
Revert "Add only to the test we are interested in"
danieljbruce Aug 18, 2023
4b62317
Merge branch 'main' into multi-db
danieljbruce Aug 21, 2023
88e20ed
Merge branch 'main' of https://github.com/googleapis/nodejs-datastore…
danieljbruce Sep 20, 2023
739796f
Add second database id
danieljbruce Sep 20, 2023
87450ef
Remove unnecessary mocks
danieljbruce Sep 20, 2023
28b5aaa
Remove unused imports
danieljbruce Sep 20, 2023
46a5627
Add parameterized testing to the test/index file
danieljbruce Sep 20, 2023
2cf3d98
Add parameterized testing to test/transaction.ts
danieljbruce Sep 20, 2023
9505083
This ensures that the tests still run on the deft
danieljbruce Sep 20, 2023
e34735a
Add parameterized testing for the system tests
danieljbruce Sep 20, 2023
eb55764
Use default datastore variable in new tests
danieljbruce Sep 20, 2023
992117f
inline add database id
danieljbruce Sep 21, 2023
7312f49
Modify the namespace in parameterized tests
danieljbruce Sep 21, 2023
aef80a1
Move databaseId to SharedQueryOptions for alignme
danieljbruce Sep 21, 2023
72255ef
Run the linter
danieljbruce Sep 27, 2023
07dc746
Merge branch 'main' into multi-db
danieljbruce Sep 28, 2023
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@types/node": "^20.4.9",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^10.0.0",
"async": "^3.2.4",
"c8": "^8.0.1",
"gapic-tools": "^0.1.8",
"gts": "^5.0.0",
Expand Down
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,16 @@ class Datastore extends DatastoreRequest {
);
}

/**
* Gets the database id that all requests will be run against.
*
* @returns {string} The database id that the current client is set to that
* requests will run against.
*/
getDatabaseId(): string | undefined {
return this.options.databaseId;
}

getProjectId(): Promise<string> {
return this.auth.getProjectId();
}
Expand Down Expand Up @@ -1818,6 +1828,7 @@ promisifyAll(Datastore, {
'double',
'isDouble',
'geoPoint',
'getDatabaseId',
'getProjectId',
'isGeoPoint',
'index',
Expand Down Expand Up @@ -1898,6 +1909,7 @@ export interface DatastoreOptions extends GoogleAuthOptions {
namespace?: string;
apiEndpoint?: string;
sslCreds?: ChannelCredentials;
databaseId?: string;
}

export interface KeyToLegacyUrlSafeCallback {
Expand Down
5 changes: 5 additions & 0 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
KeyProto,
ResponseResult,
Entities,
ValueProto,

Check warning on line 47 in src/request.ts

View workflow job for this annotation

GitHub Actions / lint

'ValueProto' is defined but never used
} from './entity';
import {
Query,
Expand Down Expand Up @@ -596,9 +596,9 @@
const results = res.batch.aggregationResults;
const finalResults = results
.map(
(aggregationResult: any) => aggregationResult.aggregateProperties

Check warning on line 599 in src/request.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
)
.map((aggregateProperties: any) =>

Check warning on line 601 in src/request.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
Object.fromEntries(
new Map(
Object.keys(aggregateProperties).map(key => [
Expand Down Expand Up @@ -933,7 +933,7 @@
callback?: SaveCallback
): void | Promise<CommitResponse> {
const transaction = this.datastore.transaction();
transaction.run(async (err: any) => {

Check warning on line 936 in src/request.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (err) {
try {
await transaction.rollback();
Expand Down Expand Up @@ -992,6 +992,10 @@
}
}

if (datastore.options && datastore.options.databaseId) {
reqOpts.databaseId = datastore.options.databaseId;
}

if (method === 'rollback') {
reqOpts.transaction = this.id;
}
Expand Down Expand Up @@ -1143,6 +1147,7 @@
reqOpts?: RequestOptions;
}
export interface SharedQueryOptions {
databaseId?: string;
projectId?: string;
partitionId?: google.datastore.v1.IPartitionId | null;
readOptions?: {
Expand Down
126 changes: 122 additions & 4 deletions system-test/datastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,33 @@
import * as path from 'path';
import {after, before, describe, it} from 'mocha';
import * as yaml from 'js-yaml';
import {Datastore, Index} from '../src';
import {Datastore, DatastoreOptions, Index} from '../src';
import {google} from '../protos/protos';
import {Storage} from '@google-cloud/storage';
import {AggregateField} from '../src/aggregate';
import {PropertyFilter, and, or} from '../src/filter';
import {entity} from '../src/entity';
import KEY_SYMBOL = entity.KEY_SYMBOL;

const async = require('async');

const SECOND_DATABASE_ID = 'multidb-test';

async.each(
[

Check failure on line 33 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
{

Check failure on line 34 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `······` with `····`
namespace: `${Date.now()}`,

Check failure on line 35 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
},

Check failure on line 36 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
{

Check failure on line 37 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `······` with `····`
databaseId: SECOND_DATABASE_ID,

Check failure on line 38 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
kolea2 marked this conversation as resolved.
Show resolved Hide resolved
namespace: `second-db-${Date.now()}`,

Check failure on line 39 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `········` with `······`
},

Check failure on line 40 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
],

Check failure on line 41 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `····` with `··`
(clientOptions: DatastoreOptions) => {

Check failure on line 42 in system-test/datastore.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
describe('Datastore', () => {
let timeBeforeDataCreation: number;
const testKinds: string[] = [];
const datastore = new Datastore({
namespace: `${Date.now()}`,
});
const datastore = new Datastore(clientOptions);
// Override the Key method so we can track what keys are created during the
// tests. They are then deleted in the `after` hook.
const key = datastore.key;
Expand Down Expand Up @@ -333,6 +346,110 @@
await datastore.delete(postKey);
});

describe('multi-db support for read and write operations', () => {
const namespace = `${Date.now()}`;
const keyHierarchy = ['Post', 'post1'];
const defaultDatastore = new Datastore({namespace});
it('should run a query with another database', async () => {
// First verify that a record gets written to datastore
const postKey = defaultDatastore.key(keyHierarchy);
await defaultDatastore.save({key: postKey, data: post});
const query = defaultDatastore.createQuery('Post').hasAncestor(postKey);
const [defaultDatastoreResults] = await defaultDatastore.runQuery(query);
assert.strictEqual(defaultDatastoreResults.length, 1);
const [entity] = await defaultDatastore.get(postKey);
assert.strictEqual(entity.author, 'Silvano');
// With another database, verify that a query returns no results
const otherDatastore = new Datastore({
namespace,
databaseId: SECOND_DATABASE_ID,
});
const [secondDatastoreResults] = await otherDatastore.runQuery(query);
assert.strictEqual(secondDatastoreResults.length, 0);
const [otherEntity] = await otherDatastore.get(postKey);
assert(typeof otherEntity === 'undefined');
// Cleanup
await defaultDatastore.delete(postKey);
});
it('should ensure save works with another database', async () => {
// First verify that the default database is empty
const postKey = defaultDatastore.key(keyHierarchy);
const query = defaultDatastore.createQuery('Post').hasAncestor(postKey);
const [defaultDatastoreResults] = await defaultDatastore.runQuery(query);
assert.strictEqual(defaultDatastoreResults.length, 0);
const [originalSecondaryResults] = await defaultDatastore.runQuery(query);
assert.strictEqual(originalSecondaryResults.length, 0);
const [entity] = await defaultDatastore.get(postKey);
assert(typeof entity === 'undefined');
// With another database, verify that saving to the database works
const otherDatastore = new Datastore({
namespace,
databaseId: SECOND_DATABASE_ID,
});
await otherDatastore.save({key: postKey, data: post});
const [secondDatastoreResults] = await otherDatastore.runQuery(query);
assert.strictEqual(secondDatastoreResults.length, 1);
const [originalResults] = await defaultDatastore.runQuery(query);
assert.strictEqual(originalResults.length, 0);
const [otherEntity] = await otherDatastore.get(postKey);
assert.strictEqual(otherEntity.author, 'Silvano');
// Cleanup
await otherDatastore.delete(postKey);
});
it('should ensure save respects the databaseId parameter per key', async () => {
interface DatastoreData {
key: entity.Key;
data: any;
}
const secondaryDatastore = new Datastore({
namespace: `${Date.now()}`,
databaseId: SECOND_DATABASE_ID,
});
// Save all data to the default database
const defaultAuthor = 'default database author';
const defaultData = Object.assign({}, post);
defaultData.author = defaultAuthor;
const defaultPostKey = defaultDatastore.key(['Post', 'default post key']);
await defaultDatastore.save({key: defaultPostKey, data: defaultData});
// Save all data to the secondary database
const secondaryIndices = [1, 2, 3];
const secondaryData: DatastoreData[] = secondaryIndices.map(number => {
const authorName = 'secondary author ' + number.toString();
const keyName = 'secondary key ' + number.toString();
const postData = Object.assign({}, post);
postData.author = authorName;
return {
key: secondaryDatastore.key(['Post', keyName]),
data: postData,
};
});
await Promise.all(
secondaryData.map(async datum => secondaryDatastore.save(datum))
);
// Next, ensure that the default database has the right records
const query = defaultDatastore.createQuery('Post').hasAncestor(defaultPostKey);
const [defaultDatastoreResults] = await defaultDatastore.runQuery(query);
assert.strictEqual(defaultDatastoreResults.length, 1);
assert.strictEqual(defaultDatastoreResults[0].author, defaultAuthor);
// Next, ensure that the other database has the right records
await Promise.all(
secondaryData.map(async datum => {
const query = secondaryDatastore
.createQuery('Post')
.hasAncestor(datum.key);
const [results] = await secondaryDatastore.runQuery(query);
assert.strictEqual(results.length, 1);
assert.strictEqual(results[0].author, datum.data.author);
})
);
// Cleanup
await defaultDatastore.delete(defaultPostKey);
await Promise.all(
secondaryData.map(datum => secondaryDatastore.delete(datum.key))
);
});
});

it('should save/get/delete from a snapshot', async () => {
function sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
Expand Down Expand Up @@ -1862,3 +1979,4 @@
});
});
});
});
25 changes: 23 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ import * as proxyquire from 'proxyquire';
import {PassThrough, Readable} from 'stream';

import * as ds from '../src';
import {DatastoreOptions} from '../src';
import {Datastore, DatastoreOptions} from '../src';
import {entity, Entity, EntityProto, EntityObject} from '../src/entity';
import {RequestConfig} from '../src/request';
import * as is from 'is';
import * as sinon from 'sinon';
import * as extend from 'extend';
const async = require('async');

// eslint-disable-next-line @typescript-eslint/no-var-requires
const v1 = require('../src/v1/index.js');
Expand Down Expand Up @@ -91,6 +92,10 @@ function fakeGoogleAuth(...args: Array<{}>) {

let createInsecureOverride: Function | null;

const SECOND_DATABASE_ID = 'multidb-test';

export {SECOND_DATABASE_ID};

const fakeGoogleGax = {
GoogleAuth: fakeGoogleAuth,
GrpcClient: class extends gax.GrpcClient {
Expand Down Expand Up @@ -139,6 +144,9 @@ function FakeV1() {}

const sandbox = sinon.createSandbox();

async.each(
[{namespace: `${Date.now()}`}, {namespace: `second-db-${Date.now()}`, databaseId: SECOND_DATABASE_ID}],
(clientOptions: DatastoreOptions) => {
describe('Datastore', () => {
let Datastore: typeof ds.Datastore;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -149,7 +157,7 @@ describe('Datastore', () => {

const DATASTORE_PROJECT_ID_CACHED = process.env.DATASTORE_PROJECT_ID;

const OPTIONS = {
const DEFAULT_OPTIONS = {
projectId: PROJECT_ID,
apiEndpoint: 'http://localhost',
credentials: {},
Expand All @@ -158,6 +166,8 @@ describe('Datastore', () => {
namespace: NAMESPACE,
};

const OPTIONS = Object.assign(DEFAULT_OPTIONS, clientOptions);

before(() => {
Object.assign(fakeEntity, fakeEntityInit);
Datastore = proxyquire('../src', {
Expand Down Expand Up @@ -2150,4 +2160,15 @@ describe('Datastore', () => {
assert.strictEqual(key.name, 'Test');
});
});

describe('multi-db support', () => {
it('should get the database id from the client', async () => {
const otherDatastore = new Datastore({
namespace: `${Date.now()}`,
databaseId: SECOND_DATABASE_ID,
});
assert.strictEqual(otherDatastore.getDatabaseId(), SECOND_DATABASE_ID);
});
});
});
});
40 changes: 40 additions & 0 deletions test/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const {Query} = require('../src/query');
import {Datastore} from '../src';
import {AggregateField, AggregateQuery} from '../src/aggregate';
import {PropertyFilter, EntityFilter, or} from '../src/filter';
import {entity} from '../src/entity';
import {SECOND_DATABASE_ID} from './index';

describe('Query', () => {
const SCOPE = {} as Datastore;
Expand Down Expand Up @@ -558,4 +560,42 @@ describe('Query', () => {
assert.strictEqual(results, runQueryReturnValue);
});
});

it('should pass the database id to the generated layer', async () => {
const options = {
namespace: `${Date.now()}`,
databaseId: SECOND_DATABASE_ID,
projectId: 'test-project-id',
};
const clientName = 'DatastoreClient';
const otherDatastore = new Datastore(options);
const postKey = new entity.Key({path: ['Post', 'post1']});
// Initialize the generated client so that we can mock it out
const gapic = Object.freeze({
v1: require('../src/v1'),
});
otherDatastore.clients_.set(clientName, new gapic.v1[clientName](options));
const dataClient = otherDatastore.clients_.get(clientName);
const projectId = await otherDatastore.getProjectId();
if (dataClient) {
dataClient['commit'] = (
request: any,
options: any,
callback: (err?: unknown) => void
) => {
try {
assert.strictEqual(request.databaseId, SECOND_DATABASE_ID);
assert.strictEqual(request.projectId, projectId);
assert.strictEqual(
options.headers['google-cloud-resource-prefix'],
`projects/${projectId}`
);
} catch (e) {
callback(e);
}
callback();
};
}
await otherDatastore.save({key: postKey, data: {title: 'test'}});
});
});
16 changes: 12 additions & 4 deletions test/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import * as assert from 'assert';
import {afterEach, beforeEach, before, describe, it} from 'mocha';
import * as proxyquire from 'proxyquire';

// import {google} from '../proto/datastore';
import {Datastore, DatastoreRequest, Query, TransactionOptions} from '../src';
import {Datastore, DatastoreOptions, DatastoreRequest, Query, TransactionOptions} from '../src';
import {Entity} from '../src/entity';
import * as tsTypes from '../src/transaction';
import * as sinon from 'sinon';
import {RequestConfig} from '../src/request';
import {SECOND_DATABASE_ID} from './index';
const async = require('async');

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Any = any;
Expand Down Expand Up @@ -50,19 +52,24 @@ const fakePfy = Object.assign({}, pfy, {
},
});

async.each(
[{}, {databaseId: SECOND_DATABASE_ID}],
(clientOptions: DatastoreOptions) => {
describe('Transaction', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we run the linter, this block will become indented and the PR will be hard to read.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, there's a setting in the GitHub interface to do just that. Clicking the small cog icon when in the "Files Changed" tab will open the popup where it's possible to select & click on "Hide whitespace > Apply and reload" option. Using that option will give you just the same type of view you have right now after you run the linter.
Screenshot 2023-09-27 at 4 39 15 PM

It's also a git command line option: git diff -w

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice!

let Transaction: typeof tsTypes.Transaction;
let transaction: tsTypes.Transaction;
const TRANSACTION_ID = 'transaction-id';
const PROJECT_ID = 'project-id';
const NAMESPACE = 'a-namespace';

const DATASTORE = {
const DEFAULT_DATASTORE = {
request_() {},
projectId: PROJECT_ID,
namespace: NAMESPACE,
} as {} as Datastore;

const DATASTORE = Object.assign(DEFAULT_DATASTORE, clientOptions);

function key(path: Path) {
return new entity.Key({path: arrify(path)});
}
Expand Down Expand Up @@ -582,7 +589,7 @@ describe('Transaction', () => {
},
} as {} as TransactionOptions;

transaction.request_ = config => {
transaction.request_ = (config: RequestConfig) => {
assert.deepStrictEqual(config.reqOpts, options);
done();
};
Expand Down Expand Up @@ -751,3 +758,4 @@ describe('Transaction', () => {
});
});
});
});
Loading