fix(plugin-workflow): adjust await sleep time for test cases (#691)
This commit is contained in:
parent
a73c37c927
commit
1a4d88d089
@ -61,7 +61,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
expect(status).toBe(202);
|
expect(status).toBe(202);
|
||||||
|
|
||||||
// NOTE: wait for no await execution
|
// NOTE: wait for no await execution
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [resolved] = await workflow.getExecutions();
|
const [resolved] = await workflow.getExecutions();
|
||||||
expect(resolved.status).toBe(EXECUTION_STATUS.RESOLVED);
|
expect(resolved.status).toBe(EXECUTION_STATUS.RESOLVED);
|
||||||
@ -162,7 +162,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res3.status).toBe(202);
|
expect(res3.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [j2] = await pending.getJobs();
|
const [j2] = await pending.getJobs();
|
||||||
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
|
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
|
||||||
@ -207,7 +207,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [j2] = await pending.getJobs();
|
const [j2] = await pending.getJobs();
|
||||||
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
|
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
|
||||||
@ -248,7 +248,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res.status).toBe(202);
|
expect(res.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [execution] = await workflow.getExecutions();
|
const [execution] = await workflow.getExecutions();
|
||||||
expect(execution.status).toBe(EXECUTION_STATUS.RESOLVED);
|
expect(execution.status).toBe(EXECUTION_STATUS.RESOLVED);
|
||||||
@ -285,7 +285,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
||||||
@ -306,7 +306,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res2.status).toBe(202);
|
expect(res2.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e2] = await workflow.getExecutions();
|
const [e2] = await workflow.getExecutions();
|
||||||
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
|
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
|
||||||
@ -340,7 +340,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.REJECTED);
|
expect(e1.status).toBe(EXECUTION_STATUS.REJECTED);
|
||||||
@ -387,7 +387,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
||||||
@ -408,7 +408,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res2.status).toBe(202);
|
expect(res2.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e2] = await workflow.getExecutions();
|
const [e2] = await workflow.getExecutions();
|
||||||
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);
|
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);
|
||||||
@ -444,7 +444,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.RESOLVED);
|
expect(e1.status).toBe(EXECUTION_STATUS.RESOLVED);
|
||||||
@ -486,7 +486,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
||||||
@ -502,7 +502,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res2.status).toBe(202);
|
expect(res2.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e2] = await workflow.getExecutions();
|
const [e2] = await workflow.getExecutions();
|
||||||
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
|
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
|
||||||
@ -536,7 +536,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res1.status).toBe(202);
|
expect(res1.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e1] = await workflow.getExecutions();
|
const [e1] = await workflow.getExecutions();
|
||||||
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
|
||||||
@ -552,7 +552,7 @@ describe('workflow > instructions > prompt', () => {
|
|||||||
});
|
});
|
||||||
expect(res2.status).toBe(202);
|
expect(res2.status).toBe(202);
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(1000);
|
||||||
|
|
||||||
const [e2] = await workflow.getExecutions();
|
const [e2] = await workflow.getExecutions();
|
||||||
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);
|
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);
|
||||||
|
Loading…
Reference in New Issue
Block a user