diff --git a/test/integration/node-specific/resource_clean_up.test.ts b/test/integration/node-specific/resource_clean_up.test.ts index 9e021b65790..1e1256f3d43 100644 --- a/test/integration/node-specific/resource_clean_up.test.ts +++ b/test/integration/node-specific/resource_clean_up.test.ts @@ -37,31 +37,22 @@ describe('Driver Resources', () => { if (globalThis.AbortController == null || typeof this.configuration.serverApi === 'string') { return; } - try { - const res = await runScriptAndReturnHeapInfo( - 'no_resource_leak_connect_close', - this.configuration, - async function run({ MongoClient, uri }) { - const mongoClient = new MongoClient(uri, { minPoolSize: 100 }); - await mongoClient.connect(); - // Any operations will reproduce the issue found in v5.0.0/v4.13.0 - // it would seem the MessageStream has to be used? - await mongoClient.db().command({ ping: 1 }); - await mongoClient.close(); - } - ); - startingMemoryUsed = res.startingMemoryUsed; - endingMemoryUsed = res.endingMemoryUsed; - heap = res.heap; - } catch (error) { - // We don't expect the process execution to ever fail, - // leaving helpful debugging if we see this in CI - console.log(`runScript error message: ${error.message}`); - console.log(`runScript error stack: ${error.stack}`); - console.log(`runScript error cause: ${error.cause}`); - // Fail the test - this.test?.error(error); - } + const res = await runScriptAndReturnHeapInfo( + 'no_resource_leak_connect_close', + this.configuration, + async function run({ MongoClient, uri }) { + const mongoClient = new MongoClient(uri, { minPoolSize: 100 }); + await mongoClient.connect(); + // Any operations will reproduce the issue found in v5.0.0/v4.13.0 + // it would seem the MessageStream has to be used? + await mongoClient.db().command({ ping: 1 }); + await mongoClient.close(); + } + ); + + startingMemoryUsed = res.startingMemoryUsed; + endingMemoryUsed = res.endingMemoryUsed; + heap = res.heap; }); describe('ending memory usage', () => { diff --git a/test/integration/node-specific/resource_tracking_script_builder.ts b/test/integration/node-specific/resource_tracking_script_builder.ts index 69273c90c5b..cb135fff224 100644 --- a/test/integration/node-specific/resource_tracking_script_builder.ts +++ b/test/integration/node-specific/resource_tracking_script_builder.ts @@ -28,7 +28,7 @@ export type ProcessResourceTestFunction = (options: { const HEAP_RESOURCE_SCRIPT_PATH = path.resolve( __dirname, - '../../tools/fixtures/resource_script.in.js' + '../../tools/fixtures/heap_resource_script.in.js' ); const REPORT_RESOURCE_SCRIPT_PATH = path.resolve( __dirname, diff --git a/test/tools/fixtures/heap_resource_script.in.js b/test/tools/fixtures/heap_resource_script.in.js index c64a6f5d95e..69083f8c5c4 100644 --- a/test/tools/fixtures/heap_resource_script.in.js +++ b/test/tools/fixtures/heap_resource_script.in.js @@ -4,7 +4,7 @@ const driverPath = DRIVER_SOURCE_PATH; const func = FUNCTION_STRING; -const name = NAME_STRING; +const name = SCRIPT_NAME_STRING; const uri = URI_STRING; const iterations = ITERATIONS_STRING;