Skip to content

Commit 6a14962

Browse files
committed
stabilize index retry stress test
1 parent e446dc3 commit 6a14962

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

test/index-retry.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,6 @@ describe("OpenAIAuthPlugin rate-limit retry", () => {
694694
});
695695

696696
it("keeps the total request cap when empty-response retries and server-error rotation combine", async () => {
697-
vi.useFakeTimers();
698697
const logger = await import("../lib/logger.js");
699698
const logWarnSpy = vi.spyOn(logger, "logWarn").mockImplementation(() => {});
700699

@@ -752,11 +751,7 @@ describe("OpenAIAuthPlugin rate-limit retry", () => {
752751
});
753752

754753
const sdk = (await plugin.auth.loader(getAuth, { options: {}, models: {} })) as any;
755-
const fetchPromise = sdk.fetch("https://example.com", {});
756-
757-
await vi.advanceTimersByTimeAsync(1500);
758-
759-
const response = await fetchPromise;
754+
const response = await sdk.fetch("https://example.com", {});
760755
const payload = await response.json();
761756

762757
expect(fetchMock).toHaveBeenCalledTimes(6);

0 commit comments

Comments
 (0)