summaryrefslogtreecommitdiff
path: root/sw-server/src/test/kotlin/org/luxons
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2021-02-13 17:16:19 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2021-02-13 17:16:19 +0100
commit7114b43f39a323737640cb196da0d9347d76e880 (patch)
tree40cea023186b31fa33747250800637e922c86b3c /sw-server/src/test/kotlin/org/luxons
parentFix potential race in chooseName (diff)
downloadseven-wonders-7114b43f39a323737640cb196da0d9347d76e880.tar.gz
seven-wonders-7114b43f39a323737640cb196da0d9347d76e880.tar.bz2
seven-wonders-7114b43f39a323737640cb196da0d9347d76e880.zip
Avoid exception in test (harmless, but still)
Diffstat (limited to 'sw-server/src/test/kotlin/org/luxons')
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt7
1 files changed, 2 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 4d76d7b8..df40b93d 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
@@ -6,10 +6,7 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withTimeout
import kotlinx.coroutines.withTimeoutOrNull
import org.junit.runner.RunWith
-import org.luxons.sevenwonders.client.SevenWondersClient
-import org.luxons.sevenwonders.client.SevenWondersSession
-import org.luxons.sevenwonders.client.createGameAndAwaitLobby
-import org.luxons.sevenwonders.client.joinGameAndAwaitLobby
+import org.luxons.sevenwonders.client.*
import org.luxons.sevenwonders.model.Action
import org.luxons.sevenwonders.model.api.GameListEvent
import org.luxons.sevenwonders.model.api.LobbyDTO
@@ -66,7 +63,7 @@ class SevenWondersTest {
val outsiderSession = newPlayer("Outsider")
val gameStartedEvents = outsiderSession.watchGameStarted()
- ownerSession.startGame()
+ ownerSession.startGameAndAwaitFirstTurn()
val nullForTimeout = withTimeoutOrNull(50) { gameStartedEvents.first() }
assertNull(nullForTimeout, "outsider should not receive the game start event of this game")
bgstack15