diff --git a/examples/ci/app/ci/upstash/redis.test.ts b/examples/ci/app/ci/upstash/redis.test.ts index 8ff16f4..b82c590 100644 --- a/examples/ci/app/ci/upstash/redis.test.ts +++ b/examples/ci/app/ci/upstash/redis.test.ts @@ -6,11 +6,11 @@ import { nanoid } from "../utils"; describe("redis", () => { test("should throw on missing results", () => { expect(() => - redis.checkRedisForResults("some-route", "some-id", -1, "some-result") + redis.checkRedisForResults("some-route", "some-id", -1, "some-result", 1) ).toThrow( "result not found for route some-route with randomTestId some-id" ) - }, { timeout: 10000 }) + }, { timeout: 15000 }) test("should throw when saving results without any increment", () => { expect(() => diff --git a/examples/ci/app/ci/upstash/redis.ts b/examples/ci/app/ci/upstash/redis.ts index 1ffbf39..7cd2677 100644 --- a/examples/ci/app/ci/upstash/redis.ts +++ b/examples/ci/app/ci/upstash/redis.ts @@ -113,11 +113,12 @@ export const checkRedisForResults = async ( randomTestId: string, expectedCallCount: number, expectedResult: string, + retryOverride?: number ) => { const key = getRedisKey("result", route, randomTestId) let testResult: RedisResult | null = null - for (let i=1; i<=RETRY_COUNT; i++) { + for (let i=1; i<= (retryOverride ?? RETRY_COUNT); i++) { testResult = await redis.get(key) if (testResult) { break diff --git a/examples/ci/test.ts b/examples/ci/test.ts deleted file mode 100644 index a9fc344..0000000 --- a/examples/ci/test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Client } from "@upstash/qstash"; -import { checkWorkflowStart } from "app/ci/upstash/qstash"; - -const c = new Client({ - token: "eyJVc2VySUQiOiJ0ZXN0VXNlciIsIlBhc3N3b3JkIjoidGVzdFBhc3N3b3JkIn0=", - baseUrl: "http://127.0.0.1:8000" -}) - -const {messageId} = await c.publishJSON({ - url: "https://requestcatcher.com", -}) - -await checkWorkflowStart(messageId) \ No newline at end of file