-
Notifications
You must be signed in to change notification settings - Fork 112
fix: race condition among transactions when running parallely #2369
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
Changes from all commits
1f32e90
b645053
a446455
6459b9e
a8738bd
225a84d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,12 +213,11 @@ describe('MultiplexedSession', () => { | |
|
|
||
| it('should pass back the session and txn', done => { | ||
| const fakeTxn = new FakeTransaction() as unknown as Transaction; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where are we mocking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have removed the assignment but we are returning the transaction using session!.transaction((session!.parent as Database).queryOptions_), |
||
| fakeMuxSession.txn = fakeTxn; | ||
| sandbox.stub(multiplexedSession, '_acquire').resolves(fakeMuxSession); | ||
| multiplexedSession.getSession((err, session, txn) => { | ||
| assert.ifError(err); | ||
| assert.strictEqual(session, fakeMuxSession); | ||
| assert.strictEqual(txn, fakeTxn); | ||
| assert.deepStrictEqual(txn, fakeTxn); | ||
| done(); | ||
| }); | ||
| }); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.