diff --git a/packages/backend-core/src/queue/inMemoryQueue.ts b/packages/backend-core/src/queue/inMemoryQueue.ts index 2ad95e64d0..dc6890e655 100644 --- a/packages/backend-core/src/queue/inMemoryQueue.ts +++ b/packages/backend-core/src/queue/inMemoryQueue.ts @@ -87,9 +87,7 @@ export class InMemoryQueue implements Partial> { */ async process(concurrencyOrFunc: number | any, func?: any) { func = typeof concurrencyOrFunc === "number" ? func : concurrencyOrFunc - this._emitter.on("message", async msg => { - const message = msg - + this._emitter.on("message", async message => { // For the purpose of testing, don't trigger cron jobs immediately. // Require the test to trigger them manually with timestamps. if (!message.manualTrigger && message.opts?.repeat != null) { diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index 6698d6e69d..a916131a39 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -166,18 +166,6 @@ if (descriptions.length) { ) } - // const resetRowUsage = async () => { - // await config.doInContext( - // undefined, - // async () => - // await quotas.setUsage( - // 0, - // StaticQuotaName.ROWS, - // QuotaUsageType.STATIC - // ) - // ) - // } - const getRowUsage = async () => { const { total } = await config.doInContext(undefined, () => quotas.getCurrentUsageValues( @@ -225,10 +213,6 @@ if (descriptions.length) { table = await config.api.table.save(defaultTable()) }) - beforeEach(async () => { - // await resetRowUsage() - }) - describe("create", () => { it("creates a new row successfully", async () => { await expectRowUsage(isInternal ? 1 : 0, async () => { diff --git a/packages/server/src/tests/jestSetup.ts b/packages/server/src/tests/jestSetup.ts index 6c03dec8d4..d9b8a37f98 100644 --- a/packages/server/src/tests/jestSetup.ts +++ b/packages/server/src/tests/jestSetup.ts @@ -3,7 +3,6 @@ import * as matchers from "jest-extended" import { env as coreEnv, timers } from "@budibase/backend-core" import { testContainerUtils } from "@budibase/backend-core/tests" import nock from "nock" -import { quotas } from "@budibase/pro" expect.extend(matchers) if (!process.env.CI) { @@ -25,6 +24,7 @@ nock.enableNetConnect(host => { testContainerUtils.setupEnv(env, coreEnv) beforeAll(async () => { + const quotas = require("@budibase/pro").quotas quotas.disable() }) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index 675009d74a..f6067f44f5 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -293,13 +293,6 @@ class Orchestrator { hasErrored(context: AutomationContext): boolean { return context._error === true - // const [_trigger, ...steps] = context.steps - // for (const step of steps) { - // if (step.success === false) { - // return true - // } - // } - // return false } async execute(): Promise {