Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in code of receptors must be visible in console #1490

Open
alexander-yevsyukov opened this issue Oct 29, 2022 · 2 comments
Open

Errors in code of receptors must be visible in console #1490

alexander-yevsyukov opened this issue Oct 29, 2022 · 2 comments
Labels
/Routing Issues related to signal routing
Milestone

Comments

@alexander-yevsyukov
Copy link
Contributor

I was working on a test fixture CountingContext using Kotlin DSL and couldn't get results I expected from the very simple logic.

It turned out that I used DSL in a wrong way. It caused UnsupportedOperationException on a map object delegate deep inside Protobuf. It wasn't visible at all because we catch exceptions, create errors, and associate them with the dispatched signal. But nothing happens in the console about it. It just goes silently and smoothly, but in a wrong way.

We need to shout about such errors. Otherwise, it takes much time to catch it, and the silence is a disservice.

@alexander-yevsyukov alexander-yevsyukov added the /Routing Issues related to signal routing label Oct 29, 2022
@alexander-yevsyukov alexander-yevsyukov added this to the M1 milestone Oct 29, 2022
@armiol
Copy link
Contributor

armiol commented Oct 29, 2022

We have discussed similar cases in real projects. Let's gather on Monday and discuss this one as well.

@alexander-yevsyukov
Copy link
Contributor Author

A comment from a user (copied from Google Chat):

Столкнулся со следующей проблемой во время тестирования Backlog: BBC тесты дают false-positive результаты, если state объекта после обработки цепочки событий нечаянно совпадает с тем, что мы ожидаем в тест кейса. Такое совпадение возможно, если во время обработки сигнала было брошено исключение, например, в @apply методе.

Пример из Backlog. Цепочка событий IssueCreated -> IssueLabeled -> IssueUnlabeled должна привести к тому, что у issue поле label пустое. Если убрать событие IssueLabeled из цепочки, поле label всё еще пустое и тест проходит, однако DiagnosticsLogger на самом деле логгирует, что мы не смогли обработать IssueUnlabeled событие.

Предложение: давайте во время тестов пробрасывать исключения из обработчиков событий наверх.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
/Routing Issues related to signal routing
Projects
None yet
Development

No branches or pull requests

2 participants