From 1d257b3c08144bc96b1b57363edcfe56be88d3c8 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Thu, 22 Jul 2021 15:57:32 +0200 Subject: [PATCH] test: fixed MarvelousServerTest with non-erroring tinylog config --- .../marvelous/server/MarvelousServerTest.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Server/src/test/java/uulm/teamname/marvelous/server/MarvelousServerTest.java b/Server/src/test/java/uulm/teamname/marvelous/server/MarvelousServerTest.java index e5ea4dc..68faede 100644 --- a/Server/src/test/java/uulm/teamname/marvelous/server/MarvelousServerTest.java +++ b/Server/src/test/java/uulm/teamname/marvelous/server/MarvelousServerTest.java @@ -56,18 +56,14 @@ class MarvelousServerTest extends BaseGameLogicTest { json = new JSON(characterConfig); - Map map = new HashMap<>(); - Configuration.replace(map); - map.put("writer1", "console"); - map.put("writer1.level", "trace"); - map.put("writer1.format", "[{thread}] {level}: {message}"); - Configuration.replace(map); - } + if (!Configuration.isFrozen()) { + Configuration.set("writer1", "console"); + Configuration.set("writer1.level", "trace"); + Configuration.set("writer1.format", "[{thread}] {level}: {message}"); + } + } - // If you want to complete this test, go ahead. It's slightly complicated, but if you understand this test, - // you should also understand the server, which serves as a good intro to it. You can - of course - also - // just ignore it. @Test void main() { UserManager m = UserManager.getInstance();