Skip to content

Commit f8c802e

Browse files
committed
test: more fixes
1 parent e3c447d commit f8c802e

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ export type {
431431
SeverityLevel
432432
} from './mongo_logger';
433433
export type {
434+
Abortable,
434435
CommonEvents,
435436
EventsDescription,
436437
GenericListener,

test/integration/client-side-encryption/driver.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ describe('CSOT', function () {
10011001

10021002
const { result: error } = await measureDuration(() =>
10031003
stateMachine
1004-
.fetchKeys(client, 'test.test', BSON.serialize({}), timeoutContext)
1004+
.fetchKeys(client, 'test.test', BSON.serialize({}), { timeoutContext })
10051005
.catch(e => e)
10061006
);
10071007
expect(error).to.be.instanceOf(MongoOperationTimeoutError);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('CSOT spec unit tests', function () {
138138
timeoutMS: 500,
139139
serverSelectionTimeoutMS: 30000
140140
});
141-
const err = await stateMachine.kmsRequest(request, timeoutContext).catch(e => e);
141+
const err = await stateMachine.kmsRequest(request, { timeoutContext }).catch(e => e);
142142
expect(err).to.be.instanceOf(MongoOperationTimeoutError);
143143
expect(err.errmsg).to.equal('KMS request timed out');
144144
});

test/integration/node-specific/abort_signal.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ describe('AbortSignal support', () => {
196196
});
197197

198198
describe('and the signal is aborted during server selection', () => {
199+
const metadata: MongoDBMetadataUI = { requires: { topology: 'replicaset' } };
200+
199201
function test(cursorAPI, args) {
200202
let controller: AbortController;
201203
let signal: AbortSignal;
@@ -220,7 +222,7 @@ describe('AbortSignal support', () => {
220222
await cursor?.close();
221223
});
222224

223-
it(`rejects ${cursorAPI.toString()} with MongoAbortedError`, async () => {
225+
it(`rejects ${cursorAPI.toString()} with MongoAbortedError`, metadata, async () => {
224226
const willBeResult = captureCursorError(cursor, cursorAPI, args);
225227

226228
await sleep(10);

test/unit/client-side-encryption/state_machine.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ describe('StateMachine', function () {
8181
a: new Long('0'),
8282
b: new Int32(0)
8383
};
84-
const options = { promoteLongs: false, promoteValues: false };
84+
const options = {
85+
promoteLongs: false,
86+
promoteValues: false,
87+
signal: undefined,
88+
timeoutMS: undefined
89+
};
8590
const serializedCommand = serialize(command);
8691
const stateMachine = new StateMachine({} as any);
8792

0 commit comments

Comments
 (0)