From 91cd9e95365e461943813da47b668289dccfc35f Mon Sep 17 00:00:00 2001 From: Fangjin Yang Date: Fri, 30 Nov 2012 13:17:14 -0800 Subject: [PATCH] fix broken UT --- .../src/main/java/com/metamx/druid/http/InfoResource.java | 7 ++++--- .../com/metamx/druid/coordination/ZkCoordinatorTest.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/com/metamx/druid/http/InfoResource.java b/server/src/main/java/com/metamx/druid/http/InfoResource.java index e2d7bf5e567..fccae2a4910 100644 --- a/server/src/main/java/com/metamx/druid/http/InfoResource.java +++ b/server/src/main/java/com/metamx/druid/http/InfoResource.java @@ -296,9 +296,10 @@ public class InfoResource final List rules ) { - return Response.status(Response.Status.OK) - .entity(databaseRuleCoordinator.overrideRule(dataSourceName, rules)) - .build(); + if (databaseRuleCoordinator.overrideRule(dataSourceName, rules)) { + return Response.status(Response.Status.OK).build(); + } + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } @GET diff --git a/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java b/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java index ebe3009b2a7..c5d528117b5 100644 --- a/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java +++ b/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java @@ -133,7 +133,7 @@ public class ZkCoordinatorTest @Override public String getSubType() { - return null; + return "normal"; } }, "dummyType"