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
fixed wrong gc calculation #4203
Conversation
@@ -20,6 +20,7 @@ trait Mockito extends MockitoSugar { | |||
def times(num: Int) = M.times(num) | |||
def timeout(millis: Int) = M.timeout(millis.toLong) | |||
def atLeastOnce = M.atLeastOnce() | |||
def once = M.times(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
times(1)
is the default, so this is redundant, but ok if you want to be very explicit =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, did`t know that. Should I change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually like it personally.
verify(mock).abc()
vs verify(mock, once).abc()
is much more obvious.
LGTM, I guess that we need to cherry-pick this, so a changelog entry would be nice =) |
LGTM after the style updates. |
Thanks for fixing this nasty bug! |
Before the task state refactoring the class
ExpungeOverdueLostTasksActor
had following logic to filter unreachable tasks which received 24 hours no updates:During the refactoring the filter was changed to
tasks.values.flatMap(_.tasks.filter(task => isTimedOut(task.mesosStatus)))
which misses the fact that it should filter the unreachable tasks, which I re-introduced with this PR by adding
task => task.isUnreachable && isTimedOut(task.mesosStatus)