Fix test plugin to correctly add action

This commit is contained in:
Ryan Ernst 2015-08-22 16:08:35 -07:00
parent d5819b6f7b
commit ef592a8e17
1 changed files with 4 additions and 5 deletions

View File

@ -400,19 +400,18 @@ public class ContextAndHeaderTransportIT extends ESIntegTestCase {
public Collection<Module> nodeModules() { public Collection<Module> nodeModules() {
return Collections.<Module>singletonList(new ActionLoggingModule()); return Collections.<Module>singletonList(new ActionLoggingModule());
} }
public void onModule(ActionModule module) {
module.registerFilter(LoggingFilter.class);
}
} }
public static class ActionLoggingModule extends AbstractModule { public static class ActionLoggingModule extends AbstractModule {
@Override @Override
protected void configure() { protected void configure() {
bind(LoggingFilter.class).asEagerSingleton(); bind(LoggingFilter.class).asEagerSingleton();
} }
public void onModule(ActionModule module) {
module.registerFilter(LoggingFilter.class);
}
} }
public static class LoggingFilter extends ActionFilter.Simple { public static class LoggingFilter extends ActionFilter.Simple {