Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed Sep 25, 2024
1 parent 90a3e78 commit b133f86
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
1 change: 0 additions & 1 deletion test/integration/collection-management/collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ describe('Collection', function () {
});

afterEach(async function () {
await coll.drop();
await client.close();
sinon.restore();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,22 @@ describe('Connection', function () {
}
});

it('supports fire-and-forget messages', async function () {
const options: ConnectionOptions = {
...commonConnectOptions,
connectionType: Connection,
...this.configuration.options,
metadata: makeClientMetadata({ driverInfo: {} }),
extendedMetadata: addContainerMetadata(makeClientMetadata({ driverInfo: {} }))
};

const conn = await connect(options);
const readSpy = sinon.spy(conn, 'readMany');
await conn.command(ns('$admin.cmd'), { ping: 1 }, { moreToCome: true });
expect(readSpy).to.not.have.been.called;
it('supports fire-and-forget messages', {
metadata: { requires: { apiVersion: false, topology: '!load-balanced' } },
test: async function () {
const options: ConnectionOptions = {
...commonConnectOptions,
connectionType: Connection,
...this.configuration.options,
metadata: makeClientMetadata({ driverInfo: {} }),
extendedMetadata: addContainerMetadata(makeClientMetadata({ driverInfo: {} }))
};

const conn = await connect(options);
const readSpy = sinon.spy(conn, 'readMany');
await conn.command(ns('$admin.cmd'), { ping: 1 }, { moreToCome: true });
expect(readSpy).to.not.have.been.called;
}
});
});

Expand Down

0 comments on commit b133f86

Please sign in to comment.