Skip to content

Commit

Permalink
Try to fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Apr 27, 2021
1 parent b30e201 commit eb12ec7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion server/lobbyconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,10 @@ async def command_hello(self, message):

old_player = self.player_service.get_player(self.player.id)
if old_player:
self._logger.debug("player {} already signed in: {}".format(self.player.id, old_player))
self._logger.debug(
"player %s already signed in: %s",
self.player.id, old_player
)
if old_player.lobby_connection is not None:
with contextlib.suppress(DisconnectedError):
old_player.lobby_connection.write_warning(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def queue_player_for_matchmaking(user, lobby_server, queue_name):
"search_info",
state="start",
queue_name=queue_name,
timeout=5
timeout=10
)

return proto
Expand Down
6 changes: 4 additions & 2 deletions tests/integration_tests/test_matchmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ async def test_anti_map_repetition(lobby_server):
# was played. We don't actually play the game out here, so the players
# game history should remain unchanged.
for _ in range(20):
await proto1.close()
await proto2.close()
await asyncio.gather(
proto1.close(),
proto2.close()
)

proto1, proto2 = await queue_players_for_matchmaking(lobby_server)
msg = await read_until_command(proto1, "game_launch")
Expand Down

0 comments on commit eb12ec7

Please sign in to comment.