Skip to content

Commit 8f3a175

Browse files
operation count tests
1 parent 5e3db08 commit 8f3a175

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/server-selection/operation_count.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('Server Operation Count Tests', function () {
120120
it('is zero after a successful command', testMetadata, async function () {
121121
const server = Array.from(client.topology.s.servers.values())[0];
122122
expect(server.s.operationCount).to.equal(0);
123-
const commandSpy = sinon.spy(server, 'command');
123+
const commandSpy = sinon.spy(server, 'modernCommand');
124124
const incrementSpy = sinon.spy(server, 'incrementOperationCount');
125125
const decrementSpy = sinon.spy(server, 'decrementOperationCount');
126126

@@ -147,7 +147,7 @@ describe('Server Operation Count Tests', function () {
147147
const server = Array.from(client.topology.s.servers.values())[0];
148148
expect(server.s.operationCount).to.equal(0);
149149

150-
const commandSpy = sinon.spy(server, 'command');
150+
const commandSpy = sinon.spy(server, 'modernCommand');
151151

152152
const error = await collection.insertOne({ count: 1 }).catch(e => e);
153153

@@ -171,7 +171,7 @@ describe('Server Operation Count Tests', function () {
171171
sinon
172172
.stub(ConnectionPool.prototype, 'checkOut')
173173
.rejects(new Error('unable to checkout connection'));
174-
const commandSpy = sinon.spy(server, 'command');
174+
const commandSpy = sinon.spy(server, 'modernCommand');
175175

176176
const error = await collection.insertOne({ count: 1 }).catch(e => e);
177177

0 commit comments

Comments
 (0)