[TEST] Don't stop MockAppender some nodes might concurrently use it

This commit is contained in:
Simon Willnauer 2016-11-15 10:48:23 +01:00
parent 6d9af2fff4
commit 200a2850a9
1 changed files with 6 additions and 2 deletions

View File

@ -451,7 +451,9 @@ public class UpdateSettingsIT extends ESIntegTestCase {
} finally { } finally {
Loggers.setLevel(rootLogger, savedLevel); Loggers.setLevel(rootLogger, savedLevel);
Loggers.removeAppender(rootLogger, mockAppender); Loggers.removeAppender(rootLogger, mockAppender);
mockAppender.stop(); // don't call stop here some node might still use this reference at this point causing tests to fail.
// this is only relevant in integ tests, unittest can control what uses a logger and what doesn't
// mockAppender.stop();
} }
} }
@ -551,7 +553,9 @@ public class UpdateSettingsIT extends ESIntegTestCase {
} finally { } finally {
Loggers.setLevel(rootLogger, savedLevel); Loggers.setLevel(rootLogger, savedLevel);
Loggers.removeAppender(rootLogger, mockAppender); Loggers.removeAppender(rootLogger, mockAppender);
mockAppender.stop(); // don't call stop here some node might still use this reference at this point causing tests to fail.
// this is only relevant in integ tests, unittest can control what uses a logger and what doesn't
// mockAppender.stop();
} }
} }