Skip to content

Commit 0bf221f

Browse files
committed
test(NODE-3299): convert txn legacy spec tests
1 parent ecfc615 commit 0bf221f

File tree

139 files changed

+42744
-32833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+42744
-32833
lines changed

test/integration/transactions/transactions.spec.test.js

Lines changed: 0 additions & 137 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import * as path from 'path';
2+
3+
import { loadSpecTests } from '../../spec';
4+
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
5+
6+
const SKIPPED_TESTS = [
7+
// TODO(NODE-5925) - secondary read preference not allowed in transactions.
8+
'readPreference inherited from defaultTransactionOptions',
9+
// TODO(NODE-5924) - Fix modification of readConcern object post message send.
10+
'readConcern local in defaultTransactionOptions',
11+
'defaultTransactionOptions override client options',
12+
'transaction options inherited from defaultTransactionOptions',
13+
'transaction options inherited from client',
14+
'causal consistency disabled'
15+
// TODO(NODE-5855) - Gone away after NODE-5929
16+
];
17+
18+
describe('Transactions Spec Unified Tests', function () {
19+
this.beforeEach(function () {
20+
if (this.configuration.topologyType === 'LoadBalanced') {
21+
if (this.currentTest) {
22+
this.currentTest.skipReason =
23+
'TODO(NODE-5931) - Fix socket leaks in load balancer transaction tests.';
24+
}
25+
}
26+
this.skip();
27+
});
28+
29+
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')), test => {
30+
return SKIPPED_TESTS.includes(test.description)
31+
? 'TODO(NODE-5924/NODE-5925): Skipping failing transaction tests'
32+
: false;
33+
});
34+
});

0 commit comments

Comments
 (0)