summaryrefslogtreecommitdiff
path: root/sw-server
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-04-08 00:28:29 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-04-08 00:28:29 +0200
commita6844dda42f4274f1765eddb00a69c97c7ba8334 (patch)
tree9b0c58a887f774bbec496896d445411d823837cf /sw-server
parentEnable ktlint on sw-ui (diff)
downloadseven-wonders-a6844dda42f4274f1765eddb00a69c97c7ba8334.tar.gz
seven-wonders-a6844dda42f4274f1765eddb00a69c97c7ba8334.tar.bz2
seven-wonders-a6844dda42f4274f1765eddb00a69c97c7ba8334.zip
Fix tests
Diffstat (limited to 'sw-server')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt1
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt1
2 files changed, 1 insertions, 1 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
index 3de0de97..3fa2ac87 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
@@ -41,7 +41,6 @@ class GameBrowserController @Autowired constructor(
@SubscribeMapping("/games") // prefix /topic not shown
fun listGames(principal: Principal): Collection<LobbyDTO> {
logger.info("Player '{}' subscribed to /topic/games", principal.name)
- val player = playerRepository.find(principal.name)
return lobbyRepository.list().map { it.toDTO() }
}
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 022c162d..0b64c74b 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
@@ -73,6 +73,7 @@ class SevenWondersTest {
ownerSession.startGame()
val nothing = withTimeoutOrNull(30) { started.join() }
assertNull(nothing)
+ started.cancel()
disconnect(ownerSession, session1, session2, outsiderSession)
}
}
bgstack15