From de9d05ff493c7f023cfd6f259b141ad71c369087 Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Wed, 3 Apr 2024 09:41:39 -0400 Subject: [PATCH] Remove debug logging --- packages/driver/src/conUtils.ts | 6 ------ packages/driver/test/connection.test.ts | 16 +++------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/packages/driver/src/conUtils.ts b/packages/driver/src/conUtils.ts index ec98263ee..5803f90bd 100644 --- a/packages/driver/src/conUtils.ts +++ b/packages/driver/src/conUtils.ts @@ -30,10 +30,6 @@ import { InterfaceError } from "./errors"; import { decodeB64, utf8Decoder, utf8Encoder } from "./primitives/buffer"; import { crcHqx } from "./primitives/crcHqx"; -import Debug from "debug"; - -const debug = Debug("edgedb:con_utils"); - const DOMAIN_NAME_MAX_LEN = 63; export type Address = [string, number]; @@ -193,8 +189,6 @@ export class ResolvedConnectConfig { source: string, validator?: (value: NonNullable) => this[`_${Param}`] ): boolean { - const log = debug.extend("_setParam"); - log("setting %s to %o from %s", param, value, source); if (this[`_${param}`] === null) { this[`_${param}Source`] = source; if (value !== null) { diff --git a/packages/driver/test/connection.test.ts b/packages/driver/test/connection.test.ts index fe4a60fb6..705094acc 100644 --- a/packages/driver/test/connection.test.ts +++ b/packages/driver/test/connection.test.ts @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import debug from "debug"; let mockFs = false; let mockedFiles: { [key: string]: string } = {}; @@ -76,7 +75,7 @@ jest.mock("os", () => { import * as fs from "fs"; import * as crypto from "crypto"; import { join as pathJoin } from "path"; -import { Client, Duration } from "../src/index.node"; +import { type Client, Duration } from "../src/index.node"; import { parseDuration } from "../src/conUtils"; import { parseConnectArguments, findStashPath } from "../src/conUtils.server"; import { getClient } from "./testbase"; @@ -233,16 +232,8 @@ type ConnectionTestCase = { warnings?: string[]; } & ({ result: ConnectionResult } | { error: { type: string } }); -async function runConnectionTest( - testcase: ConnectionTestCase, - shouldDebug = false -): Promise { +async function runConnectionTest(testcase: ConnectionTestCase): Promise { const { env = {}, opts: _opts = {}, fs } = testcase; - if (shouldDebug) { - debug.enable("edgedb:con_utils:*"); - } else { - debug.disable(); - } const opts = { ..._opts, instanceName: _opts.instance }; @@ -335,7 +326,6 @@ describe("parseConnectArguments", () => { for (const [i, testcase] of connectionTestcases.entries()) { const { fs, platform } = testcase; - const knownFailure = [221, 222, 228, 229, 242, 244, 245, 258].includes(i); if ( fs && ((!platform && @@ -348,7 +338,7 @@ describe("parseConnectArguments", () => { }); } else { test(`shared client test: index={${i}}`, async () => { - await runConnectionTest(testcase, knownFailure); + await runConnectionTest(testcase); }); } }