Use utils
This commit is contained in:
parent
4f6a09fb02
commit
b2488af6da
|
@ -1,7 +1,12 @@
|
|||
import tk from "timekeeper"
|
||||
|
||||
import _ from "lodash"
|
||||
import { DBTestConfiguration, generator, structures } from "../../../tests"
|
||||
import {
|
||||
DBTestConfiguration,
|
||||
generator,
|
||||
structures,
|
||||
utils,
|
||||
} from "../../../tests"
|
||||
import { getDB } from "../../db"
|
||||
|
||||
import {
|
||||
|
@ -13,11 +18,7 @@ import {
|
|||
const initialTime = Date.now()
|
||||
|
||||
async function waitForQueueCompletion() {
|
||||
do {
|
||||
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
||||
} while (await DocWritethroughProcessor.queue.count())
|
||||
|
||||
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
||||
await utils.queue.processMessages(DocWritethroughProcessor.queue)
|
||||
}
|
||||
|
||||
describe("docWritethrough", () => {
|
||||
|
|
|
@ -4,4 +4,3 @@ export { generator } from "./structures"
|
|||
export * as testContainerUtils from "./testContainerUtils"
|
||||
export * as utils from "./utils"
|
||||
export * from "./jestUtils"
|
||||
export * as queue from "./queue"
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
export * as time from "./time"
|
||||
export * as queue from "./queue"
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 21e9cb41076c7064b6d5e16e0434705149440023
|
||||
Subproject commit a35c797b1f2cc067b6edd78d498bb2e239d677e1
|
|
@ -1,4 +1,4 @@
|
|||
import { mocks, structures, queue } from "@budibase/backend-core/tests"
|
||||
import { mocks, structures, utils } from "@budibase/backend-core/tests"
|
||||
import { context, events, features } from "@budibase/backend-core"
|
||||
import { Event, IdentityType } from "@budibase/types"
|
||||
import { TestConfiguration } from "../../../../tests"
|
||||
|
@ -55,7 +55,7 @@ describe("/api/global/auditlogs (%s)", () => {
|
|||
await events.app.created(structures.apps.app(APP_ID))
|
||||
})
|
||||
|
||||
await queue.processMessages(
|
||||
await utils.queue.processMessages(
|
||||
events.processors.auditLogsProcessor.queue
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue