Flaky test: ReviewApiTests.FindingsAreRequested lists a finding twice

Abierto
#75 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp
Área
api, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
C#
Estrellas
0
Forks
0
Merge medio
1 h 7 min
PR fusionados (30 d)
69

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.