Skip to content
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

Add timeout to base game class #798

Merged
merged 2 commits into from
Jun 11, 2021
Merged

Conversation

Sheikah45
Copy link
Member

Fixes #797

@Sheikah45 Sheikah45 requested a review from Askaholic June 9, 2021 11:37
@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #798 (67b9ff6) into develop (23955b8) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
server/games/coop.py 100.00% <ø> (ø)
server/games/custom_game.py 100.00% <ø> (ø)
server/games/game.py 95.65% <100.00%> (+0.01%) ⬆️
server/timing/timer.py 77.77% <0.00%> (-1.59%) ⬇️

Copy link
Collaborator

@Askaholic Askaholic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a simple regression test in unit_tests/test_ladder_service.py. It just needs to

  1. Call LadderService.start_game
  2. Wait 60+ seconds
  3. Assert that Game.on_game_ended was called

Make sure it's an async test and use the fast_forward decorator. Also make sure that it actually fails without these changes :P

server/games/game.py Show resolved Hide resolved
@Sheikah45 Sheikah45 requested a review from Askaholic June 10, 2021 11:29
@@ -149,17 +149,23 @@ async def test_start_game_1v1(
LadderGame.wait_launched.assert_called_once()


@fast_forward(35)
@fast_forward(65)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice there was already a test for this

@Askaholic Askaholic merged commit b81229c into develop Jun 11, 2021
@Askaholic Askaholic deleted the bugfix/#797-ladder-host-timeout branch June 11, 2021 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak when ladder games fail to start
2 participants