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

Another flaky test "test_accept_while_party_queued" #741

Closed
Askaholic opened this issue Mar 6, 2021 · 0 comments · Fixed by #742
Closed

Another flaky test "test_accept_while_party_queued" #741

Askaholic opened this issue Mar 6, 2021 · 0 comments · Fixed by #742

Comments

@Askaholic
Copy link
Collaborator

Haven't seen this one before, but it looks pretty rare to me. Proto2 should also be reading until game_info after logging in.

________________________ test_accept_while_party_queued ________________________

lobby_server = ServerContext(UnitTestServer[QDataStreamProtocol])

    async def test_accept_while_party_queued(lobby_server):
        test_id, _, proto1 = await connect_and_sign_in(
            ("test", "test_password"), lobby_server
        )
        rhiza_id, _, proto2 = await connect_and_sign_in(
            ("rhiza", "puff_the_magic_dragon"), lobby_server
        )
    
        await read_until_command(proto1, "game_info")
        await invite_to_party(proto1, rhiza_id)
        await proto1.send_message({
            "command": "game_matchmaking",
            "state": "start",
        })
    
        await read_until_command(proto2, "party_invite")
        await accept_party_invite(proto2, test_id)
    
        msg = await proto2.read_message()
>       assert msg == {
            "command": "notice",
            "style": "error",
            "text": "That party is already in queue"
        }
E       AssertionError: assert {'autojoin': ...oes': [], ...} == {'command': '...ady in queue'}
E         Differing items:
E         {'command': 'social'} != {'command': 'notice'}
E         Left contains 5 more items:
E         {'autojoin': ['#123_clan'],
E          'channels': ['#123_clan'],
E          'foes': [],
E          'friends': [],
E          'power': 0}
E         Right contains 2 more items:
E         {'style': 'error', 'text': 'That party is already in queue'}
E         Use -v to get the full diff
Askaholic added a commit that referenced this issue Mar 6, 2021
* Make sure login sequence is complete before sending commands (#742)
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 a pull request may close this issue.

1 participant