From 2ff86984dad7afd9307070eabc4be889cfcb603d Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 21 Jan 2014 10:47:45 -0800 Subject: [PATCH] fix broken ut --- .../indexing/overlord/scaling/EC2AutoScalingStrategyTest.java | 2 +- .../plumber/ServerTimeRejectionPolicyFactoryTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indexing-service/src/test/java/io/druid/indexing/overlord/scaling/EC2AutoScalingStrategyTest.java b/indexing-service/src/test/java/io/druid/indexing/overlord/scaling/EC2AutoScalingStrategyTest.java index e6cd52c80ac..1fd3510b45a 100644 --- a/indexing-service/src/test/java/io/druid/indexing/overlord/scaling/EC2AutoScalingStrategyTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/overlord/scaling/EC2AutoScalingStrategyTest.java @@ -131,6 +131,6 @@ public class EC2AutoScalingStrategyTest AutoScalingData deleted = strategy.terminate(Arrays.asList("dummyIP")); Assert.assertEquals(deleted.getNodeIds().size(), 1); - Assert.assertEquals(String.format("%s:8080", IP), deleted.getNodeIds().get(0)); + Assert.assertEquals(INSTANCE_ID, deleted.getNodeIds().get(0)); } } diff --git a/server/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java b/server/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java index 14212705f82..c79a7bd4986 100644 --- a/server/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java +++ b/server/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java @@ -36,8 +36,8 @@ public class ServerTimeRejectionPolicyFactoryTest RejectionPolicy rejectionPolicy = new ServerTimeRejectionPolicyFactory().create(period); DateTime now = new DateTime(); - DateTime past = now.minus(period).minus(1); - DateTime future = now.plus(period).plus(1); + DateTime past = now.minus(period).minus(100); + DateTime future = now.plus(period).plus(100); Assert.assertTrue(rejectionPolicy.accept(now.getMillis())); Assert.assertFalse(rejectionPolicy.accept(past.getMillis()));