Fix test plugin to correctly add action
This commit is contained in:
parent
d5819b6f7b
commit
ef592a8e17
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue