Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions src/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ function attemptTransaction<T>(
try {
promise = fn(session);
} catch (err) {
console.log('1', err);
promise = Promise.reject(err);
}

Expand All @@ -608,6 +609,7 @@ function attemptTransaction<T>(
return attemptTransactionCommit(session, startTime, fn, result, options);
},
err => {
console.log('2', err);
function maybeRetryOrThrow(err: MongoError): Promise<any> {
if (
err instanceof MongoError &&
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as path from 'path';

import { loadSpecTests } from '../../spec';
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';

const SKIPPED_TESTS = [
'callback succeeds after multiple connection errors',
'callback is not retried after non-transient error',
'callback is not retried after non-transient error (DuplicateKeyError)'
];

describe('Transactions Convenient API Spec Unified Tests', function () {
runUnifiedSuite(loadSpecTests(path.join('transactions-convenient-api', 'unified')), test => {
return SKIPPED_TESTS.includes(test.description)
? 'TODO(NODE-): Skipping failing transaction tests'
: false;
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const filter: TestFilter = ({ description }) => {
return false;
};

describe('Unified test format runner', function unifiedTestRunner() {
describe.only('Unified test format runner', function unifiedTestRunner() {
// Valid tests that should pass
runUnifiedSuite(loadSpecTests('unified-test-format/valid-pass'), filter);
});
220 changes: 0 additions & 220 deletions test/spec/transactions-convenient-api/README.rst

This file was deleted.

Loading