Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Apr 3, 2024
1 parent 2025281 commit 77ed38c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
4 changes: 1 addition & 3 deletions packages/driver/package.json
Expand Up @@ -48,7 +48,5 @@
"watch": "nodemon -e js,ts,tsx --ignore dist -x ",
"dev": "yarn tsc --project tsconfig.json --incremental && yarn build:deno"
},
"dependencies": {
"debug": "^4.3.4"
}
"dependencies": {}
}
6 changes: 0 additions & 6 deletions packages/driver/src/conUtils.ts
Expand Up @@ -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];
Expand Down Expand Up @@ -193,8 +189,6 @@ export class ResolvedConnectConfig {
source: string,
validator?: (value: NonNullable<Value>) => 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) {
Expand Down
16 changes: 3 additions & 13 deletions packages/driver/test/connection.test.ts
Expand Up @@ -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 } = {};
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -233,16 +232,8 @@ type ConnectionTestCase = {
warnings?: string[];
} & ({ result: ConnectionResult } | { error: { type: string } });

async function runConnectionTest(
testcase: ConnectionTestCase,
shouldDebug = false
): Promise<void> {
async function runConnectionTest(testcase: ConnectionTestCase): Promise<void> {
const { env = {}, opts: _opts = {}, fs } = testcase;
if (shouldDebug) {
debug.enable("edgedb:con_utils:*");
} else {
debug.disable();
}

const opts = { ..._opts, instanceName: _opts.instance };

Expand Down Expand Up @@ -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 &&
Expand All @@ -348,7 +338,7 @@ describe("parseConnectArguments", () => {
});
} else {
test(`shared client test: index={${i}}`, async () => {
await runConnectionTest(testcase, knownFailure);
await runConnectionTest(testcase);
});
}
}
Expand Down

0 comments on commit 77ed38c

Please sign in to comment.