Skip to content

Commit

Permalink
Register error listener in evil logger tests
Browse files Browse the repository at this point in the history
This test needs an error listener registered since we configure logging
here.
  • Loading branch information
jasontedor committed Apr 13, 2017
1 parent a1c2fe9 commit edd16fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public void log(StatusData data) {
* logged by the status logger before logging is configured.
*/
public static void registerErrorListener() {
error.set(false);
StatusLogger.getLogger().registerListener(ERROR_LISTENER);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@

public class EvilLoggerTests extends ESTestCase {

@Override
public void setUp() throws Exception {
super.setUp();
LogConfigurator.registerErrorListener();
}

@Override
public void tearDown() throws Exception {
LoggerContext context = (LoggerContext) LogManager.getContext(false);
Expand Down

0 comments on commit edd16fa

Please sign in to comment.