-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(NODE-5929): convert txn legacy spec tests #3987
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
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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)', | ||
'withTransaction succeeds if callback aborts', | ||
'unpin after transient error within a transaction', | ||
'withTransaction succeeds if callback commits', | ||
'withTransaction still succeeds if callback aborts and runs extra op', | ||
'withTransaction still succeeds if callback commits and runs extra op', | ||
'withTransaction commits after callback returns (second transaction)', | ||
'withTransaction commits after callback returns', | ||
'withTransaction and no transaction options set', | ||
'withTransaction inherits transaction options from defaultTransactionOptions', | ||
'withTransaction explicit transaction options override defaultTransactionOptions', | ||
'withTransaction explicit transaction options' | ||
]; | ||
|
||
describe('Transactions Convenient API Spec Unified Tests', function () { | ||
beforeEach(function () { | ||
if (this.configuration.topologyType === 'LoadBalanced') { | ||
if (this.currentTest) { | ||
this.currentTest.skipReason = | ||
'TODO(NODE-5931) - Fix socket leaks in load balancer transaction tests.'; | ||
} | ||
this.skip(); | ||
} | ||
}); | ||
|
||
runUnifiedSuite(loadSpecTests(path.join('transactions-convenient-api', 'unified')), test => { | ||
return SKIPPED_TESTS.includes(test.description) | ||
? 'TODO(NODE-5855/DRIVERS-2816): Skipping failing transaction tests' | ||
: false; | ||
}); | ||
}); |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as path from 'path'; | ||
|
||
import { loadSpecTests } from '../../spec'; | ||
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner'; | ||
|
||
const SKIPPED_TESTS = [ | ||
// TODO(NODE-5925) - secondary read preference not allowed in transactions. | ||
'readPreference inherited from defaultTransactionOptions', | ||
// TODO(NODE-5924) - Fix modification of readConcern object post message send. | ||
'readConcern local in defaultTransactionOptions', | ||
'defaultTransactionOptions override client options', | ||
'transaction options inherited from defaultTransactionOptions', | ||
'transaction options inherited from client', | ||
'causal consistency disabled' | ||
// TODO(NODE-5855) - Gone away after NODE-5929 | ||
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. The unified tests that are related to NODE-5855 are automatically skipped by the unified tests due to the fact that |
||
]; | ||
|
||
describe('Transactions Spec Unified Tests', function () { | ||
this.beforeEach(function () { | ||
if (this.configuration.topologyType === 'LoadBalanced') { | ||
if (this.currentTest) { | ||
this.currentTest.skipReason = | ||
'TODO(NODE-5931) - Fix socket leaks in load balancer transaction tests.'; | ||
} | ||
} | ||
this.skip(); | ||
}); | ||
|
||
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')), test => { | ||
return SKIPPED_TESTS.includes(test.description) | ||
? 'TODO(NODE-5924/NODE-5925): Skipping failing transaction tests' | ||
: false; | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I converted the tests to typescript. Unskipped everything and re-verified everything was was getting skipped and filed 2 new tickets (NODE-5925 and NODE-5924) for 2 new bugs these tests exposed in the driver.