fix(plugin-workflow): adjust await sleep time for test cases (#691)

This commit is contained in:
Junyi 2022-07-28 08:13:49 +08:00 committed by GitHub
parent a73c37c927
commit 1a4d88d089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ describe('workflow > instructions > prompt', () => {
expect(status).toBe(202);
// NOTE: wait for no await execution
await sleep(500);
await sleep(1000);
const [resolved] = await workflow.getExecutions();
expect(resolved.status).toBe(EXECUTION_STATUS.RESOLVED);
@ -162,7 +162,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res3.status).toBe(202);
await sleep(500);
await sleep(1000);
const [j2] = await pending.getJobs();
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
@ -207,7 +207,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [j2] = await pending.getJobs();
expect(j2.status).toBe(JOB_STATUS.RESOLVED);
@ -248,7 +248,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res.status).toBe(202);
await sleep(500);
await sleep(1000);
const [execution] = await workflow.getExecutions();
expect(execution.status).toBe(EXECUTION_STATUS.RESOLVED);
@ -285,7 +285,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
@ -306,7 +306,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res2.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e2] = await workflow.getExecutions();
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
@ -340,7 +340,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.REJECTED);
@ -387,7 +387,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
@ -408,7 +408,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res2.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e2] = await workflow.getExecutions();
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);
@ -444,7 +444,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.RESOLVED);
@ -486,7 +486,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
@ -502,7 +502,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res2.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e2] = await workflow.getExecutions();
expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED);
@ -536,7 +536,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res1.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e1] = await workflow.getExecutions();
expect(e1.status).toBe(EXECUTION_STATUS.STARTED);
@ -552,7 +552,7 @@ describe('workflow > instructions > prompt', () => {
});
expect(res2.status).toBe(202);
await sleep(500);
await sleep(1000);
const [e2] = await workflow.getExecutions();
expect(e2.status).toBe(EXECUTION_STATUS.REJECTED);