Assume that rollover datemath tests run on the same day. (#34527)
in #28741 RolloverIT fails because we are cutting over to the next day while the test executes. We assume that this doesn't happen based on the assertions in the test. This adds a assumeTrue to ensure we are at least 5 min away form a date-flip. Closes #28741
This commit is contained in:
parent
2cc3caf5e2
commit
a93aefb4a4
|
@ -274,6 +274,7 @@ public class RolloverIT extends ESIntegTestCase {
|
|||
|
||||
public void testRolloverWithDateMath() {
|
||||
ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);
|
||||
assumeTrue("only works on the same day", now.plusMinutes(5).getDayOfYear() == now.getDayOfYear());
|
||||
String index = "test-" + DateFormatters.forPattern("YYYY.MM.dd").format(now) + "-1";
|
||||
String dateMathExp = "<test-{now/d}-1>";
|
||||
assertAcked(prepareCreate(dateMathExp).addAlias(new Alias("test_alias")).get());
|
||||
|
|
Loading…
Reference in New Issue