Flaky test: ReviewApiTests.FindingsAreRequested lists a finding twice

Aperta
#75 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
api, testing

Direzione di ricerca

Start with ReviewApiTests.FindingsAreRequested in src/KnowledgeBase.Agent.IntegrationTests/Api/ReviewApiTests.cs, then find the GET /api/review listing and the code that moves a resolved finding from the open folder to the closed one. Decide whether the listing can read both folders mid-move, or whether the test lists before the resolve settles. Done when the root cause is identified and the test passes in repeated full parallel runs of the integration suite.

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

Descrizione

bug

What happens

ReviewApiTests.FindingsAreRequested (src/KnowledgeBase.Agent.IntegrationTests/Api/ReviewApiTests.cs) sometimes fails in a full parallel run of the integration tests. GET /api/review returns the resolved finding twice:

all.Select(finding => finding.Id)
    should be
["review-2026-10-31-19-54-48-001", "review-2026-10-31-19-54-48-002"]
    but was (case sensitive comparison)
["review-2026-10-31-19-54-48-001", "review-2026-10-31-19-54-48-002", "review-2026-10-31-19-54-48-001"]

How to reproduce

Run the whole integration suite a few times: dotnet test --project src/KnowledgeBase.Agent.IntegrationTests --configuration Release. It failed in 1 of about 5 full runs on the #71 branch (PR #74). It passes when run alone.

Likely cause (not confirmed)

The id appears twice, and resolving a finding moves it from the open folder to the closed one. So the listing may read both folders while the move is still in progress, or the test may list before the resolve has settled. If it's the listing, the same duplicate could reach the Reviews page in production, so this may be a product bug rather than a test bug.

Done when

  • The cause is identified: a listing race in the API, or the test not waiting for the resolve.
  • The test passes in repeated full parallel runs.
Lingua principale
C#
Stelle
0
Fork
0
Merge medio
1h 7m
PR unite (30g)
69

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.