diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-13 17:16:19 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-13 17:16:19 +0100 |
commit | 7114b43f39a323737640cb196da0d9347d76e880 (patch) | |
tree | 40cea023186b31fa33747250800637e922c86b3c /sw-server/src/test/kotlin/org/luxons | |
parent | Fix potential race in chooseName (diff) | |
download | seven-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.kt | 7 |
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") |