fix(chat): don't report a stopped answer as running #37
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!37
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/24-chat-stop-race"
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?
Fixes the chat_test flake (finding F19).
Chat.running/1,Chat.stop/1and the runner'sregistered_pid/1usedRegistry.lookup, which keeps returning a terminated runner's entry until the Registry partition has handled the EXIT.Task.Supervisor.terminate_childis synchronous but that cleanup isn't, so right after a stoprunning/1could still return the answer (theassert Chat.running(conversation.id) == nilflake, and briefly a stopped answer shown as running in the chat pane). A privatelookup/1now drops dead pids. Re-registering was already fine.Root cause and patch from Nye.
mix test test/lamplighter/chat_test.exs --repeat-until-failure 400: 401 runs, all passmix precommit: 801 passedCloses #24