made remote manager available to ReefEventStateManager and update tests

this is first part of 859
Is RemoteConfiguration always part of DriverConfiguration or the client must add it explicitly?

From: Yingda Chen [mailto:notifications@github.com]
Sent: Tuesday, June 17, 2014 4:01 PM
To: Microsoft-CISL/REEF
Cc: Julia Wang (QIUHE)
Subject: Re: [REEF] made remote manager available to ReefEventStateManager and update tests (#860)


In reef-webserver/src/test/java/com/microsoft/reef/webserver/TestJettyHandler.java:

> @@ -51,7 +51,11 @@ public void setUp() throws InjectionException, IOException, ServletException {

>      final Configuration httpHandlerConfiguration = HttpHandlerConfiguration.CONF

>          .set(HttpHandlerConfiguration.HTTP_HANDLERS, HttpServerReefEventHandler.class)

>          .build();

> -    final Injector injector = Tang.Factory.getTang().newInjector(httpHandlerConfiguration);

> +    final JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder();

> +    cb.bindNamedParameter(RemoteConfiguration.ManagerName.class, "REEF_TEST_REMOTE_MANAGER");

> +    cb.bindNamedParameter(RemoteConfiguration.MessageCodec.class, REEFMessageCodec.class);

This is part of RemoteConfiguration and does not belong to HttpHandlerConfiguration, we do not want to have duplicate entries in HttpHandlerConfiguration. It needed to be set explicitly here in tests only because since we don't set up RemoteConfiguration in tests.

—
Reply to this email directly or view it on GitHub<https://github.com/Microsoft-CISL/REEF/pull/860/files#r13891582>.