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

test(server): extend Lobby testing #363

Merged
merged 16 commits into from
Feb 10, 2021
Merged

test(server): extend Lobby testing #363

merged 16 commits into from
Feb 10, 2021

Conversation

xeruf
Copy link
Member

@xeruf xeruf commented Jan 15, 2021

the aim is to consolidate it with the other tests (i.e. RequestTest and the like) and expand coverage

based on #382 because that solves some precursive issues

@xeruf
Copy link
Member Author

xeruf commented Feb 4, 2021

RequestTest has just become a lot more manageable and reliable 🎉

@xeruf xeruf force-pushed the test/lobbyrequests branch from 1ebee7c to e119dc4 Compare February 4, 2021 16:14
@xeruf xeruf marked this pull request as draft February 4, 2021 16:35
@xeruf
Copy link
Member Author

xeruf commented Feb 4, 2021

whoopsie - apparently some tests stopped running, that's why it all looks so smooth -.- junit-team/junit5#1914

@xeruf xeruf force-pushed the test/lobbyrequests branch from 2bfda1a to 2fccc89 Compare February 5, 2021 10:53
@xeruf xeruf marked this pull request as ready for review February 5, 2021 10:54
@xeruf
Copy link
Member Author

xeruf commented Feb 5, 2021

I've started embracing fancy Kotest matchers with which the tests and failures finally made sense to me ;)
I ran the tests multiple times and am seeing no failures at all anymore

@xeruf xeruf force-pushed the test/lobbyrequests branch from 3f52c57 to 01f92dc Compare February 5, 2021 13:34
@xeruf xeruf changed the base branch from master to fix/sdk-stuff February 9, 2021 10:50
@xeruf xeruf force-pushed the test/lobbyrequests branch from 474d841 to 269bdd5 Compare February 9, 2021 10:50
@xeruf
Copy link
Member Author

xeruf commented Feb 9, 2021

This is getting quite big, but I guess I'll go with it - the tests are still not fully fixed

@xeruf xeruf force-pushed the test/lobbyrequests branch from 269bdd5 to de33c36 Compare February 9, 2021 12:43
@xeruf
Copy link
Member Author

xeruf commented Feb 9, 2021

oh yeah, it's all working!

@xeruf xeruf added this to the 21.3.1 milestone Feb 9, 2021
Copy link
Contributor

@SKoschnicke SKoschnicke left a comment

Choose a reason for hiding this comment

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

So much nicer!

val playerListeners = room.slots.map { slot ->
PlayerListener().also { listener -> slot.role.player.addPlayerListener(listener) }
}
"start game on unpause" {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about testing what happens if the paused game receives moves? I guess that would terminate the game?

Copy link
Member Author

Choose a reason for hiding this comment

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

it should just behave like any case in which a move is sent without request: the game is canceled with an appropriate error. But yes, maybe that should have a test.

Base automatically changed from fix/sdk-stuff to master February 10, 2021 10:14
@xeruf xeruf force-pushed the test/lobbyrequests branch from de33c36 to 74a9182 Compare February 10, 2021 10:16
@xeruf xeruf merged commit 45d3178 into master Feb 10, 2021
@xeruf xeruf deleted the test/lobbyrequests branch February 10, 2021 10:17
@xeruf xeruf mentioned this pull request Feb 11, 2021
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.

2 participants