coder / coder/internal

flake: e2e externalAuth.spec.ts

Aperta
#356 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
flake
Lingua principale
Nessun dato sulla lingua
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# Problem

See https://github.com/coder/internal/issues/212 for context.

```
==> Errors
/home/runner/work/coder/coder/site/e2e/tests/externalAuth.spec.ts:15:
13 | import { beforeCoderTest, resetExternalAuthKey } from "../hooks";
14 |
> 15 | test.beforeAll(async ({ baseURL }) => {
| ^
16 | const srv = await createServer(gitAuth.webPort);
17 |
18 | // The GitHub validate endpoint returns the currently authenticated user!
"beforeAll" hook timeout of 30000ms exceeded.
```

It looks like the hardcoded port (50516) can be unavailable for more than 30s.

# Proposed Solution

1) Simply bump the timeout (https://github.com/coder/coder/pull/16528)

2) Refactor the e2e tests to dynamically create a port.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start in site/e2e/tests/externalAuth.spec.ts at the beforeAll hook on line 15, then review the createServer call, hardcoded port 50516, and the linked context. Reproduce the hook timeout and compare the proposed timeout change with dynamic port creation; done means the external-auth e2e setup no longer flakes when that port is unavailable.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
authentication, testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.