fix(diagnosis): ignore unexpected messages in the diagnosis queue #29
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!29
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/14-queue-catch-all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #14.
Diagnosis.Queuehad no catch-allhandle_info/2, so any stray message crashed it, taking its running diagnoses with it.mix testshowed one: aFunctionClauseErroron{:fake_ai_run, ...}.Logger.warning, message truncated) and ignores them.FakeProvider.run/2sends{:fake_ai_run, request}to every$callersprocess, and the queue is a caller of its diagnosis tasks. It now skips the queue.queue_test.exs: a stray message is logged and the queue stays up; a full diagnosis run sends the queue nothing unexpected (fails without the FakeProvider fix).mix precommit: 626 pass, and the:fake_ai_runFunctionClauseError is gone from the test log.Diagnosis.Queue had no catch-all handle_info, so a stray message crashed it along with the diagnoses it was running. It now logs and ignores them. The test FakeProvider no longer sends {:fake_ai_run, _} to the queue, which was the stray message mix test logged. Closes #14Review (Nye) at
7bafb48: ready. Catch-all handle_info logs and ignores, placed after the task-reply/DOWN/unpause clauses; the FakeProvider leak (the actual source of {:fake_ai_run, ...} hitting the queue) is fixed and tested. mix precommit: 626 pass. CI green.