Skip to content

test(listen): esperar el diagnóstico del acuse - #4

Merged
mendozagit merged 1 commit into
mainfrom
refactor/cli-audit
Oct 23, 2026
Merged

mendozagit merged 1 commit into
mainfrom
refactor/cli-audit

Conversation

@mendozagit

Copy link
Copy Markdown
Contributor

Resumen

Corrige una prueba de `listen` que falla de forma intermitente en el runner de Linux. Solo cambia la prueba; el CLI no cambia.

Causa

La API registra cada acuse al recibir la petición. El CLI escribe el diagnóstico `Could not acknowledge delivery...` cuando recibe la respuesta. Las pruebas esperaban los acuses y los sondeos, y leían `stderr` de inmediato, así que el diagnóstico podía no estar escrito todavía.

Cambios

  • La prueba del acuse rechazado con 404 espera la línea del diagnóstico antes de afirmarla.
  • La prueba del 409 espera la línea con `--verbose`. Sin `--verbose`, cierra `listen` antes de afirmar que la línea no aparece, porque el cierre espera a que terminen las entregas pendientes.

Verificación

  • Windows: `dotnet test` 404 de 404.
  • Linux (WSL Ubuntu, .NET 10.0.402, `dbus-run-session`): suite completa en verde; `ListenCommandTests` cinco veces seguidas en verde.
  • CI-Pipeline en `refactor/cli-audit` (run 39974780735, `workflow_dispatch`): build en verde.

La API registra cada acuse al recibir la petición, pero el CLI escribe el
diagnóstico cuando recibe la respuesta. Las pruebas esperaban solo a los
acuses y a los sondeos y leían stderr de inmediato, así que en runners
lentos el diagnóstico podía no estar escrito todavía.

Ahora la prueba espera la línea del diagnóstico cuando debe aparecer. En el
caso sin --verbose, deja que listen termine antes de afirmar que no aparece:
el apagado espera a que terminen las entregas pendientes.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3be94192-3cbf-4420-b9f5-aac9029a519e
📥 Commits

Reviewing files that changed from the base of the PR and between d7a0bd6 and e4a63db.

📒 Files selected for processing: 1
  • tests/FiscalApi.Cli.Tests/Listen/ListenCommandTests.cs
+---------------------------------------------------------+
| This PR is 10% code and 90% emotional support comments. |
+---------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mendozagit
mendozagit merged commit ca4f19b into main Oct 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant