diff --git a/examples/ci/app/ci/ci.test.ts b/examples/ci/app/ci/ci.test.ts index 95a648c..e80b334 100644 --- a/examples/ci/app/ci/ci.test.ts +++ b/examples/ci/app/ci/ci.test.ts @@ -10,7 +10,7 @@ describe("workflow integration tests", () => { await initiateTest(testConfig.route, testConfig.waitForSeconds) }, { - timeout: (testConfig.waitForSeconds + 8) * 1000 + timeout: (testConfig.waitForSeconds + 10) * 1000 } ) }); diff --git a/examples/ci/app/ci/upstash/redis.ts b/examples/ci/app/ci/upstash/redis.ts index afa0b21..58acdf5 100644 --- a/examples/ci/app/ci/upstash/redis.ts +++ b/examples/ci/app/ci/upstash/redis.ts @@ -87,7 +87,16 @@ export const checkRedisForResults = async ( expectedResult: string, ) => { const key = getRedisKey("result", route, randomTestId) - const testResult = await redis.get(key) + let testResult: RedisResult | null = null + + for (let i=0; i<3; i++) { + testResult = await redis.get(key) + if (testResult) { + break + } + await new Promise(r => setTimeout(r, 2000)); + } + if (!testResult) { throw new Error(`result not found for route ${route} with randomTestId ${randomTestId}`) }