jihoonson commented on a change in pull request #6414: Period
load/drop/broadcast rules should include the future by default
URL: https://github.com/apache/incubator-druid/pull/6414#discussion_r226189765
##########
File path:
server/src/test/java/org/apache/druid/server/coordinator/rules/PeriodLoadRuleTest.java
##########
@@ -108,29 +111,61 @@ public void testAppliesToPartialOverlap()
}
@Test
- public void testSerdeNullTieredReplicants() throws Exception
+ public void testIncludeFuture()
+ {
+ DateTime now = DateTimes.of("2012-12-31T01:00:00");
+ PeriodLoadRule includeFutureRule = new PeriodLoadRule(
+ new Period("P2D"),
+ true,
+ ImmutableMap.of("", 0)
+ );
+ PeriodLoadRule notIncludeFutureRule = new PeriodLoadRule(
+ new Period("P2D"),
+ false,
+ ImmutableMap.of("", 0)
+ );
+
+ Assert.assertTrue(
+ includeFutureRule.appliesTo(
+ builder.interval(new Interval(now.plusDays(1),
now.plusDays(2))).build(),
+ now
+ )
+ );
+ Assert.assertFalse(
+ notIncludeFutureRule.appliesTo(
+ builder.interval(new Interval(now.plusDays(1),
now.plusDays(2))).build(),
+ now
+ )
+ );
+ }
+
+ @Test
+ public void testSerdeNull() throws Exception
Review comment:
Ok. Then, please add some comments about what null variables are being
tested in this test. Same for the below test.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]