Skip to content

Commit 1fb29f2

Browse files
everything passing?
1 parent 44eb1be commit 1fb29f2

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

test/integration/connection-monitoring-and-pooling/connection.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,15 @@ describe('Connection', function () {
268268
// This test exists to prevent regression of processing many messages inside one chunk.
269269
it(
270270
'processes all of them and emits heartbeats',
271-
{ requires: { topology: 'replicaset', mongodb: '>=4.4' } },
271+
{
272+
requires: {
273+
topology: 'replicaset',
274+
mongodb: '>=4.4',
275+
// When compression is enabled, processing heartbeat events is asynchronous.
276+
predicate: () =>
277+
process.env.COMPRESSOR ? 'test requires that compression is disabled' : true
278+
}
279+
},
272280
async function () {
273281
let hbSuccess = 0;
274282
client.on('serverHeartbeatSucceeded', () => (hbSuccess += 1));
@@ -291,6 +299,7 @@ describe('Connection', function () {
291299

292300
// All of the hb will be emitted synchronously in the next tick as the entire chunk is processed.
293301
await processTick();
302+
294303
expect(hbSuccess).to.be.greaterThan(1000);
295304
}
296305
);

test/integration/node-specific/bson-options/utf8_validation.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ describe('parsing of utf8-invalid documents with cursors', function () {
9595
if (providedBuffer.includes(targetBytes)) {
9696
if (providedBuffer.split(targetBytes).length !== 2) {
9797
sinon.restore();
98-
const message = `too many target bytes sequences: received ${
99-
providedBuffer.split(targetBytes).length
100-
}`;
98+
const message = `too many target bytes sequences: received ${providedBuffer.split(targetBytes).length
99+
}`;
101100
throw new Error(message);
102101
}
103102
const buffer = Buffer.from(providedBuffer.replace(targetBytes, 'c301'.repeat(8)), 'hex');
@@ -121,7 +120,7 @@ describe('parsing of utf8-invalid documents with cursors', function () {
121120
beforeEach(async function () {
122121
if (typeof compressionPredicate() === 'string') {
123122
this.currentTest.skipReason = compressionPredicate() as string;
124-
this.currentTest.skip();
123+
this.skip();
125124
}
126125
client = this.configuration.newClient();
127126
await client.connect();
@@ -134,7 +133,7 @@ describe('parsing of utf8-invalid documents with cursors', function () {
134133

135134
afterEach(async function () {
136135
sinon.restore();
137-
await client.close();
136+
await client?.close();
138137
});
139138

140139
context('when utf-8 validation is explicitly disabled', function () {

test/tools/unified-spec-runner/entities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class UnifiedMongoClient extends MongoClient {
212212
...getEnvironmentalOptions(),
213213
...(description.serverApi ? { serverApi: description.serverApi } : {}),
214214
// TODO(NODE-5785): We need to increase the truncation length because signature.hash is a Buffer making hellos too long
215-
mongodbLogMaxDocumentLength: 1250
215+
mongodbLogMaxDocumentLength: 1300
216216
};
217217

218218
let logCollector: { buffer: LogMessage[]; write: (log: Log) => void } | undefined;

test/tools/unified-spec-runner/match.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,16 +461,14 @@ function compareCommandStartedEvents(
461461
if (expected!.commandName) {
462462
expect(
463463
expected!.commandName,
464-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
465-
actual.commandName
464+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
466465
}`
467466
).to.equal(actual.commandName);
468467
}
469468
if (expected!.databaseName) {
470469
expect(
471470
expected!.databaseName,
472-
`expected ${prefix}.databaseName to equal ${expected!.databaseName} but received ${
473-
actual.databaseName
471+
`expected ${prefix}.databaseName to equal ${expected!.databaseName} but received ${actual.databaseName
474472
}`
475473
).to.equal(actual.databaseName);
476474
}
@@ -488,8 +486,7 @@ function compareCommandSucceededEvents(
488486
if (expected!.commandName) {
489487
expect(
490488
expected!.commandName,
491-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
492-
actual.commandName
489+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
493490
}`
494491
).to.equal(actual.commandName);
495492
}
@@ -504,8 +501,7 @@ function compareCommandFailedEvents(
504501
if (expected!.commandName) {
505502
expect(
506503
expected!.commandName,
507-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
508-
actual.commandName
504+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
509505
}`
510506
).to.equal(actual.commandName);
511507
}

0 commit comments

Comments
 (0)