From 1565d355cef4883185121b024f010bf69e2cc621 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Mon, 7 Aug 2023 19:40:11 +0200 Subject: [PATCH] test(NODE-3049): drivers atlas testing --- test/tools/unified-spec-runner/entity_event_registry.ts | 2 +- test/tools/unified-spec-runner/operations.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/tools/unified-spec-runner/entity_event_registry.ts b/test/tools/unified-spec-runner/entity_event_registry.ts index 3c64416b60..25c9c862a9 100644 --- a/test/tools/unified-spec-runner/entity_event_registry.ts +++ b/test/tools/unified-spec-runner/entity_event_registry.ts @@ -40,7 +40,7 @@ const MAPPINGS = { /** * Registers events that need to be stored in the entities map, since - * the UnifiedMongoClient does not contain a ciclical dependency on the + * the UnifiedMongoClient does not contain a cyclical dependency on the * entities map itself. */ export class EntityEventRegistry { diff --git a/test/tools/unified-spec-runner/operations.ts b/test/tools/unified-spec-runner/operations.ts index 757733363f..27bcefa763 100644 --- a/test/tools/unified-spec-runner/operations.ts +++ b/test/tools/unified-spec-runner/operations.ts @@ -12,6 +12,7 @@ import { type Document, type GridFSFile, type MongoClient, + MongoError, type ObjectId, ReadConcern, ReadPreference, @@ -437,7 +438,8 @@ operations.set('loop', async ({ entities, operation, client, testConfig }) => { entities .getEntity('failures', storeFailuresAsEntity) .push({ error: error.message, time: Date.now() }); - } else if (storeErrorsAsEntity) { + } else if (storeErrorsAsEntity && !(error instanceof MongoError)) { + // Checking not a MongoError ensures it's coming from the test runner. entities .getEntity('errors', storeErrorsAsEntity) .push({ error: error.message, time: Date.now() });