-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix pop timer crash #720
Fix pop timer crash #720
Conversation
Test was flaky due to expensive autospecing
b8e524d
to
05f5419
Compare
def failed_matching_attempts(self) -> List[int]: | ||
"""Used for logging so returning a different type here is fine""" | ||
return [search.failed_matching_attempts for search in self.searches] | ||
def failed_matching_attempts(self) -> int: |
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.
may nbr_of_failed_matching_attempts
is more descriptive (and would have made this more obvious).
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 don't think the naming is a problem, but rather that returning a list here was just a bad idea on my part :P. At the time it wasn't used and I wasn't sure what to return here. I'm gonna add it to the unit tests now.
05f5419
to
c73c866
Compare
c73c866
to
d1fe598
Compare
d1fe598
to
32bfe1c
Compare
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.
LGTM!
It was not directly the fault of the pop timer, but rather an exception that could sometimes occur during random newbie matching.
CombinedSearch
objects would return a list forfailed_matching_attempts
instead of an integer. This has been fixed and I made sure to add an integration test that covers newbie matching with two solo queue-ers who were placed together by the team creation code. I also wrapped the pop timer loop contents in a try block, since this sort of error should really only be failing the current matching attempt, and not crashing the entire timer loop.