Update sleep time
This commit is contained in:
parent
0171208a36
commit
712e538c3e
@ -1313,7 +1313,7 @@ test.cb("parallel() parallel mapping", t => {
|
|||||||
.pipe(
|
.pipe(
|
||||||
parallelMap(async (data: any) => {
|
parallelMap(async (data: any) => {
|
||||||
const c = data + "_processed";
|
const c = data + "_processed";
|
||||||
await sleep(500);
|
await sleep(50);
|
||||||
orderedResults.push({
|
orderedResults.push({
|
||||||
output: c,
|
output: c,
|
||||||
processed: performance.now(),
|
processed: performance.now(),
|
||||||
@ -1327,25 +1327,25 @@ test.cb("parallel() parallel mapping", t => {
|
|||||||
.on("error", t.end)
|
.on("error", t.end)
|
||||||
.on("end", async () => {
|
.on("end", async () => {
|
||||||
expect(orderedResults[0].processed).to.be.lessThan(
|
expect(orderedResults[0].processed).to.be.lessThan(
|
||||||
orderedResults[1].processed + 500,
|
orderedResults[1].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[2].processed).to.be.lessThan(
|
expect(orderedResults[2].processed).to.be.lessThan(
|
||||||
orderedResults[3].processed + 500,
|
orderedResults[3].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[4].processed).to.be.lessThan(
|
expect(orderedResults[4].processed).to.be.lessThan(
|
||||||
orderedResults[5].processed + 500,
|
orderedResults[5].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[2].processed).to.be.greaterThan(
|
expect(orderedResults[2].processed).to.be.greaterThan(
|
||||||
orderedResults[0].processed + 500,
|
orderedResults[0].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[3].processed).to.be.greaterThan(
|
expect(orderedResults[3].processed).to.be.greaterThan(
|
||||||
orderedResults[1].processed + 500,
|
orderedResults[1].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[4].processed).to.be.greaterThan(
|
expect(orderedResults[4].processed).to.be.greaterThan(
|
||||||
orderedResults[2].processed + 500,
|
orderedResults[2].processed + 50,
|
||||||
);
|
);
|
||||||
expect(orderedResults[5].processed).to.be.greaterThan(
|
expect(orderedResults[5].processed).to.be.greaterThan(
|
||||||
orderedResults[3].processed + 500,
|
orderedResults[3].processed + 50,
|
||||||
);
|
);
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user