Close engine before reset log appender (#50390)

Merge threads can run and access the mock appender after we have stopped it.

Closes #50315
This commit is contained in:
Nhat Nguyen 2019-12-20 11:47:47 -05:00
parent 71ff330c4e
commit 975cc99516
1 changed files with 1 additions and 1 deletions

View File

@ -2376,7 +2376,7 @@ public class InternalEngineTests extends EngineTestCase {
engine.index(indexForDoc(doc));
engine.flush();
assertTrue(mockAppender.sawIndexWriterMessage);
engine.close();
} finally {
Loggers.removeAppender(rootLogger, mockAppender);
mockAppender.stop();