You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2014/12/02 21:49:11 UTC
incubator-reef git commit: [REEF-52]: Remove default implementation
annotation on HTTPServer There shouldn't be a default implementation on
HttpServer to make sure we get an early error if it isn't configured. This
removes that annotation.
Repository: incubator-reef
Updated Branches:
refs/heads/master fa353fdab -> 37c2e5c17
[REEF-52]: Remove default implementation annotation on HTTPServer
There shouldn't be a default implementation on HttpServer to make sure we get
an early error if it isn't configured. This removes that annotation.
JIRA:
[REEF-52]: https://issues.apache.org/jira/browse/REEF-52
Pull Request:
Closes #26
Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/37c2e5c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/37c2e5c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/37c2e5c1
Branch: refs/heads/master
Commit: 37c2e5c17adc04a9b1d844560e4c05675d9e011a
Parents: fa353fd
Author: Julia Wang <jw...@yahoo.com>
Authored: Tue Nov 25 15:22:18 2014 -0800
Committer: Markus Weimer <we...@apache.org>
Committed: Tue Dec 2 12:43:18 2014 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/reef/webserver/HttpServer.java | 1 -
.../test/java/org/apache/reef/webserver/TestHttpServer.java | 8 ++++++--
2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/37c2e5c1/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServer.java
----------------------------------------------------------------------
diff --git a/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServer.java b/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServer.java
index 71e8a15..37c2d74 100644
--- a/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServer.java
+++ b/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServer.java
@@ -23,7 +23,6 @@ import org.apache.reef.tang.annotations.DefaultImplementation;
/**
* HttpServer interface
*/
-@DefaultImplementation(HttpServerImpl.class)
public interface HttpServer {
/**
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/37c2e5c1/reef-webserver/src/test/java/org/apache/reef/webserver/TestHttpServer.java
----------------------------------------------------------------------
diff --git a/reef-webserver/src/test/java/org/apache/reef/webserver/TestHttpServer.java b/reef-webserver/src/test/java/org/apache/reef/webserver/TestHttpServer.java
index c3856f4..7908a42 100644
--- a/reef-webserver/src/test/java/org/apache/reef/webserver/TestHttpServer.java
+++ b/reef-webserver/src/test/java/org/apache/reef/webserver/TestHttpServer.java
@@ -34,12 +34,16 @@ import org.junit.Test;
*/
public class TestHttpServer {
+ /**
+ * This is to test the case when using HttpRuntimeConfiguration.CONF with all the ther default bindings
+ * @throws Exception
+ */
@Test
- public void httpServerDefaultTest() throws Exception {
+ public void httpServerDefaultCONFTest() throws Exception {
final Configuration httpRuntimeConfiguration = HttpRuntimeConfiguration.CONF.build();
final Injector injector = Tang.Factory.getTang().newInjector(httpRuntimeConfiguration);
final HttpServer httpServer = injector.getInstance(HttpServer.class);
- Assert.assertNotNull(httpServer);
+ Assert.assertTrue(httpServer instanceof HttpServerImpl);
httpServer.stop();
}