Skip to content

Commit dc1264f

Browse files
committed
test: add comment
1 parent 3857159 commit dc1264f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ describe('Server Operation Count Tests', function () {
124124
collection.insertOne({ count: 1 })
125125
);
126126

127-
// operation count will not be incremented synchronously after execOp async/await refactor
127+
// operation count is incremented after connection checkout, which happens asynchronously (even though there are plenty of connections in the pool).
128+
// we sleep to give the event loop a turn so that all the commands check out a connection before asserting the operation count
128129
await sleep(1);
129130

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

0 commit comments

Comments
 (0)