Skip to content

Commit

Permalink
put CSOT options on runCursorCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
W-A-James committed Aug 20, 2024
1 parent 20afd3e commit 467f29e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,11 @@ import { join } from 'path';
import { loadSpecTests } from '../../spec';
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';

const enabled = [
'override-collection-timeoutMS',
'override-database-timeoutMS',
'override-operation-timeoutMS',
'retryability-legacy-timeouts',
'retryability-timeoutMS',
'runCursorCommand',
'close-cursors',
'non-tailable-cursors',
'global-timeoutMS',
'legacy-timeouts',
'command-execution',
'cursors',
'error-transformations'
];

const skipped = {
bulkWrite: 'TODO(NODE-6274)',
'change-streams': 'TODO(NODE-6035)',
'convenient-transactions': 'TODO(NODE-5687)',
//'deprecated-options': 'TODO(NODE-5689)',
'deprecated-options': 'TODO(NODE-5689)',
'gridfs-advanced': 'TODO(NODE-6275)',
'gridfs-delete': 'TODO(NODE-6275)',
'gridfs-download': 'TODO(NODE-6275)',
Expand Down
4 changes: 3 additions & 1 deletion test/tools/unified-spec-runner/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,9 @@ operations.set('runCursorCommand', async ({ entities, operation }: OperationFunc
const { command, ...opts } = operation.arguments!;
const cursor = db.runCursorCommand(command, {
readPreference: ReadPreference.fromOptions({ readPreference: opts.readPreference }),
session: opts.session
session: opts.session,
timeoutMode: opts.timeoutMode,
timeoutMS: opts.timeoutMS
});

if (!Number.isNaN(+opts.batchSize)) cursor.setBatchSize(+opts.batchSize);
Expand Down

0 comments on commit 467f29e

Please sign in to comment.