Skip to content

Commit c12fef3

Browse files
fix flakey operation count test (#3240)
1 parent ed4ba58 commit c12fef3

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
@@ -141,11 +141,11 @@ describe('Server Operation Count Tests', function () {
141141

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

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

146-
expect(server.s.operationCount).to.equal(10);
146+
expect(server.s.operationCount).to.equal(1);
147147

148-
await Promise.all(operations);
148+
await operation;
149149

150150
expect(getMoreSpy.called).to.be.true;
151151
expect(server.s.operationCount).to.equal(0);

0 commit comments

Comments
 (0)