You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Столкнулся со следующей проблемой во время тестирования Backlog: BBC тесты дают false-positive результаты, если state объекта после обработки цепочки событий нечаянно совпадает с тем, что мы ожидаем в тест кейса. Такое совпадение возможно, если во время обработки сигнала было брошено исключение, например, в @apply методе.
Пример из Backlog. Цепочка событий IssueCreated -> IssueLabeled -> IssueUnlabeled должна привести к тому, что у issue поле label пустое. Если убрать событие IssueLabeled из цепочки, поле label всё еще пустое и тест проходит, однако DiagnosticsLogger на самом деле логгирует, что мы не смогли обработать IssueUnlabeled событие.
Предложение: давайте во время тестов пробрасывать исключения из обработчиков событий наверх.
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 wecatch
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.
The text was updated successfully, but these errors were encountered: