fix broken ut

This commit is contained in:
fjy 2014-01-21 10:47:45 -08:00
parent 0161d036b9
commit 2ff86984da
2 changed files with 3 additions and 3 deletions

View File

@ -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));
}
}

View File

@ -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()));