Skip to content

test(NODE-5862): skip transaction unpin TransientTransactionErrors spec tests #4024

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

Merged
merged 5 commits into from
Mar 8, 2024
Merged
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
22 changes: 18 additions & 4 deletions test/integration/transactions/transactions.spec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,25 @@ class TransactionsRunnerContext extends TestRunnerContext {
}
}

const UNIFIED_SKIP_TESTS = [
'unpin after TransientTransactionError error on commit',
'unpin on successful abort',
'unpin after non-transient error on abort',
'unpin after TransientTransactionError error on abort',
'unpin when a new transaction is started',
'unpin when a non-transaction write operation uses a session',
'unpin when a non-transaction read operation uses a session'
];

describe('Transactions Spec Unified Tests', function () {
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')));
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')), test =>
UNIFIED_SKIP_TESTS.includes(test.description)
? 'TODO(NODE-5855): Unskip Transactions Spec Unified Tests mongos-unpin.unpin'
: false
);
});

const SKIP_TESTS = [
const LEGACY_SKIP_TESTS = [
// TODO(NODE-3943): Investigate these commit test failures
// OLD COMMENT: commitTransaction retry seems to be swallowed by mongos in these two cases
'commitTransaction retry fails on new mongos',
Expand All @@ -97,7 +111,7 @@ describe('Transactions Spec Legacy Tests', function () {
const testContext = new TransactionsRunnerContext();
if (process.env.SERVERLESS) {
// TODO(NODE-3550): these tests should pass on serverless but currently fail
SKIP_TESTS.push(
LEGACY_SKIP_TESTS.push(
'abortTransaction only performs a single retry',
'abortTransaction does not retry after Interrupted',
'abortTransaction does not retry after WriteConcernError Interrupted',
Expand All @@ -114,7 +128,7 @@ describe('Transactions Spec Legacy Tests', function () {
});

function testFilter(spec) {
return SKIP_TESTS.indexOf(spec.description) === -1;
return LEGACY_SKIP_TESTS.indexOf(spec.description) === -1;
}

generateTopologyTests(testSuites, testContext, testFilter);
Expand Down