GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(oauth): drain failed pacing setup · lidge-jun/opencodex@9320009

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tests/claude-integration
    • messages-native-oauth.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tests/claude-integration/messages-native-oauth.test.ts‎

Copy file name to clipboardExpand all lines: tests/claude-integration/messages-native-oauth.test.ts
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,24 @@ describe("managed native Messages over Anthropic OAuth", () => {
177177
cfg.providers.anthropic!.requestPacing = { enabled: true, maxConcurrentRequests: 1 };
178178
const slot = await waitForProviderRequestSlot("anthropic", cfg.providers.anthropic!, "claude-sonnet-4-5");
179179
const pending = send(cfg, { ...BODY, stream: false });
180+
let setupFailed = false;
181+
let setupError: unknown;
180182
try {
181183
for (let i = 0; i < 100 && providerRequestPacingStatus("anthropic", cfg.providers.anthropic!).queued === 0; i++) {
182184
await new Promise(resolve => setTimeout(resolve, 5));
183185
}
184186
expect(providerRequestPacingStatus("anthropic", cfg.providers.anthropic!).queued).toBe(1);
185187
await setAccountPaused("anthropic", id!, true);
186-
} finally { slot.release(); }
188+
} catch (error) {
189+
setupFailed = true;
190+
setupError = error;
191+
} finally {
192+
slot.release();
193+
// A failed queue assertion must not leave this request running into afterEach. Drain it,
194+
// but keep the assertion as the useful failure if teardown also rejects.
195+
if (setupFailed) await pending.catch(() => undefined);
196+
}
197+
if (setupFailed) throw setupError;
187198
const { response, text } = await pending;
188199
expect(response.status).toBe(403);
189200
expect(text).toContain("Resume");

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.