Skip to content

Commit 628eb55

Browse files
committed
Fix tests and dropindexes
1 parent b64af7b commit 628eb55

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/collection.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
type ListSearchIndexesOptions
1212
} from './cursor/list_search_indexes_cursor';
1313
import type { Db } from './db';
14-
import { MongoInvalidArgumentError } from './error';
14+
import { MongoInvalidArgumentError, MongoOperationTimeoutError } from './error';
1515
import type { MongoClient, PkFactory } from './mongo_client';
1616
import type {
1717
Filter,
@@ -673,7 +673,8 @@ export class Collection<TSchema extends Document = Document> {
673673
new DropIndexOperation(this as TODO_NODE_3286, '*', resolveOptions(this, options))
674674
);
675675
return true;
676-
} catch {
676+
} catch (error) {
677+
if (error instanceof MongoOperationTimeoutError) throw error;
677678
return false;
678679
}
679680
}

test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ const skippedTests = {
3232
'timeoutMS applies to whole operation, not individual attempts - insertMany on collection':
3333
'TODO(NODE-6274)',
3434
'timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection':
35-
'TODO(NODE-6274)'
35+
'TODO(NODE-6274)',
36+
'command is not sent if RTT is greater than timeoutMS': 'TODO(DRIVERS-2965)',
37+
'Non=tailable cursor iteration timeoutMS is refreshed for getMore if timeoutMode is iteration - failure':
38+
'TODO(DRIVERS-2965)',
39+
'Non-tailable cursor lifetime remaining timeoutMS applied to getMore if timeoutMode is unset':
40+
'TODO(DRIVERS-2965)'
41+
//'timeoutMS can be configured on a MongoClient - dropIndexes on collection': 'Successfully returns false on failure, but does not surface CSOT'
3642
};
3743

3844
describe('CSOT spec tests', function () {

0 commit comments

Comments
 (0)