Skip to content

Commit

Permalink
Close engine before reset log appender (elastic#50390)
Browse files Browse the repository at this point in the history
Merge threads can run and access the mock appender after we have stopped it.

Closes elastic#50315
  • Loading branch information
dnhatn authored and SivagurunathanV committed Jan 21, 2020
1 parent 79a570f commit ce97429
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ public void testIndexWriterInfoStream() throws IllegalAccessException, IOExcepti
engine.index(indexForDoc(doc));
engine.flush();
assertTrue(mockAppender.sawIndexWriterMessage);

engine.close();
} finally {
Loggers.removeAppender(rootLogger, mockAppender);
mockAppender.stop();
Expand Down

0 comments on commit ce97429

Please sign in to comment.