Skip to content

Commit

Permalink
fix flakey operation count test (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed May 10, 2022
1 parent ed4ba58 commit c12fef3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/server-selection/operation_count.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ describe('Server Operation Count Tests', function () {

const getMoreSpy = sinon.spy(server, 'getMore');

const operations = Array.from({ length: 10 }, () => cursor.next());
const operation = cursor.next();

expect(server.s.operationCount).to.equal(10);
expect(server.s.operationCount).to.equal(1);

await Promise.all(operations);
await operation;

expect(getMoreSpy.called).to.be.true;
expect(server.s.operationCount).to.equal(0);
Expand Down

0 comments on commit c12fef3

Please sign in to comment.