Repository navigation
test: corrige expectativa de propagação de exceções no middleware - #625
Merged
regyssilveira merged 1 commit intoOct 29, 2026
Merged
regyssilveira merged 1 commit into
regyssilveira merged 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
TestMiddlewareExceptionPropagationesperava que umaEOSErrorescapasse deExecute. Essa expectativa ficou desatualizada após a correção da propagação de exceções: os middlewares devem receber o erro primeiro e, se ele continuar sem tratamento, o core aplica o fallback HTTP 500.A expectativa antiga causava uma falha na suíte Delphi mesmo com o comportamento correto do core, reproduzida no master antes do PR #624.
Ajuste
EOSError, registra sua mensagem e relança a exceção.Execute, que esse middleware recebeu o erro original, a rota não executou e o fallback retornou status 500 sem deixar a exceção escapar.HORSE_RADIX_ROUTER; antes esse teste sempre instanciava Tree, inclusive na configuração Radix.A alteração está restrita ao teste; o código de produção permanece igual.
Validação
Suíte completa com Delphi 13 Florence (
dcc32, Windows, provider padrão/Indy):Relatórios NUnit e logs preservados localmente em
benchmarks/results.git diff --checkpassou.