Some flappy test failure fixes#113
Merged
Merged
Conversation
Use a monitor to decide if a process is dead, rather than presence in the `processes()` list, as intermitently the list was inconsistent. I didn't get to the bottom of why. Using a monitor works. Also there was a process leak with vnode processes. Not that it matters from eunit, but running for > 10 minutes on my machine would lead to erlang running out of processes.
nickkeers
approved these changes
Feb 19, 2018
| end. | ||
|
|
||
| fitting_is_alive(#fitting{pid=Pid}) -> | ||
| lists:member(Pid, erlang:processes()). |
There was a problem hiding this comment.
@russelldb can this not be solved by adding an erlang:is_process_alive() call around the Pid?
It looks like the monitor is just keeping a check of when the pid goes down / when it isn't alive anymore, the docs for processes/0 mentions:
"Notice that an exiting process exists, but is not alive. That is, is_process_alive/1 returns false for an exiting process, but its process identifier is part of the result returned from processes/0."
Just thought I'd mention before we go further - I don't know what was tried before or anything, cheers.
There was a problem hiding this comment.
Looks like the fix is a bit more involved than that for some reason, weird. I'm going to go with, if it ain't broke don't fix it 👍
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.
Again around processes and their registration/visibility.
NOTE: the deps will need updating when all the other 2.2.5 -> 2.2 PRs are merged