From 200a2850a925acab5cc5ceaa33c00ce90a2ae230 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 15 Nov 2016 10:48:23 +0100 Subject: [PATCH] [TEST] Don't stop MockAppender some nodes might concurrently use it --- .../elasticsearch/indices/settings/UpdateSettingsIT.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java index 88ba954dd8e..0807ed4389c 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java +++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java @@ -451,7 +451,9 @@ public class UpdateSettingsIT extends ESIntegTestCase { } finally { Loggers.setLevel(rootLogger, savedLevel); 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 { Loggers.setLevel(rootLogger, savedLevel); 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(); } }