Skip to content

Commit 611a17c

Browse files
passing tests
1 parent 39bdcdb commit 611a17c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/cmap/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
582582
this.throwIfAborted();
583583
}
584584
} catch (error) {
585-
if (options.session != null) {
585+
if (options.session != null && !(error instanceof MongoServerError)) {
586586
updateSessionFromResponse(options.session, MongoDBResponse.empty);
587587
}
588588
if (this.shouldEmitAndLogCommand) {

src/operations/execute_operation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ async function executeOperationWithRetries<
259259
new RetryContext(willRetry ? (timeoutContext.csotEnabled() ? Infinity : 2) : 1);
260260
for (
261261
let attempt = 0;
262-
attempt <= retryContext.maxAttempts;
262+
attempt < retryContext.maxAttempts;
263263
attempt++,
264264
retryContext.maxAttempts = previousOperationError?.hasErrorLabel(
265265
MongoErrorLabel.SystemOverloadedError
266266
)
267-
? 5
267+
? 6
268268
: retryContext.maxAttempts
269269
) {
270270
if (previousOperationError) {

test/integration/client-backpressure/client-backpressure.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ function shouldSkip({ description }: Test) {
1111
return skippedTests[description] ?? false;
1212
}
1313

14-
describe.only('Client Backpressure (spec)', function () {
14+
describe('Client Backpressure (spec)', function () {
1515
runUnifiedSuite(loadSpecTests('client-backpressure'), shouldSkip);
1616
});

test/integration/transactions/transactions.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SKIPPED_TESTS = [
1313
'client bulkWrite with writeConcern in a transaction causes a transaction error'
1414
];
1515

16-
describe.only('Transactions Spec Unified Tests', function () {
16+
describe('Transactions Spec Unified Tests', function () {
1717
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')), test => {
1818
return SKIPPED_TESTS.includes(test.description)
1919
? 'TODO(NODE-5924): Skipping failing transaction tests'

0 commit comments

Comments
 (0)