Simplify api
This commit is contained in:
parent
d0aab5fa87
commit
8c88d65003
|
@ -13,21 +13,16 @@ import {
|
||||||
const initialTime = Date.now()
|
const initialTime = Date.now()
|
||||||
|
|
||||||
async function waitForQueueCompletion() {
|
async function waitForQueueCompletion() {
|
||||||
await DocWritethroughProcessor.queue.resume()
|
|
||||||
do {
|
do {
|
||||||
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
||||||
} while (await DocWritethroughProcessor.queue.count())
|
} while (await DocWritethroughProcessor.queue.count())
|
||||||
|
|
||||||
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
await DocWritethroughProcessor.queue.whenCurrentJobsFinished()
|
||||||
|
|
||||||
await DocWritethroughProcessor.queue.pause()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("docWritethrough", () => {
|
describe("docWritethrough", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
init()
|
init()
|
||||||
await DocWritethroughProcessor.queue.isReady()
|
|
||||||
await DocWritethroughProcessor.queue.pause()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const config = new DBTestConfiguration()
|
const config = new DBTestConfiguration()
|
||||||
|
|
Loading…
Reference in New Issue