diff options
author | Joffrey Bion <joffrey.bion@gmail.com> | 2019-08-08 22:57:57 +0200 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2019-10-22 22:17:05 +0200 |
commit | 91d1b6c735440699f32c8476e7016b0f08dd897c (patch) | |
tree | 4282632de23ce54f30843662ca1cf3cf1ad57f4e /sw-server/src | |
parent | Upgrade Kotlin & Kotlin Wrappers version (diff) | |
download | seven-wonders-91d1b6c735440699f32c8476e7016b0f08dd897c.tar.gz seven-wonders-91d1b6c735440699f32c8476e7016b0f08dd897c.tar.bz2 seven-wonders-91d1b6c735440699f32c8476e7016b0f08dd897c.zip |
WIP sagas
Diffstat (limited to 'sw-server/src')
-rw-r--r-- | sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt index 4771076d..7b996680 100644 --- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt +++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt @@ -69,7 +69,7 @@ class SevenWondersTest { val outsiderSession = newPlayer("Outsider") val (started) = outsiderSession.watchGameStart(lobby.id) - ownerSession.startGame(lobby.id) + ownerSession.startGame() val nothing = withTimeoutOrNull(30) { started.receive() } assertNull(nothing) disconnect(ownerSession, session1, session2, outsiderSession) @@ -126,7 +126,14 @@ class SevenWondersTest { val session3 = newPlayer("Player3") session3.joinGame(lobby.id) - session1.startGame(lobby.id) + val (gameStart1) = session1.watchGameStart(lobby.id) + val (gameStart2) = session2.watchGameStart(lobby.id) + val (gameStart3) = session3.watchGameStart(lobby.id) + session1.startGame() + + withTimeout(500) { gameStart1.receive() } + withTimeout(500) { gameStart2.receive() } + withTimeout(500) { gameStart3.receive() } val (turns1) = session1.watchTurns() val (turns2) = session2.watchTurns() @@ -134,9 +141,9 @@ class SevenWondersTest { session1.sayReady() session2.sayReady() session3.sayReady() - val turn1 = turns1.receive() - val turn2 = turns2.receive() - val turn3 = turns3.receive() + val turn1 = withTimeout(500) { turns1.receive() } + val turn2 = withTimeout(500) { turns2.receive() } + val turn3 = withTimeout(500) { turns3.receive() } assertNotNull(turn1) assertNotNull(turn2) assertNotNull(turn3) |