Test: Remove off-by-one test logic that fails every one in several thousand tests. relates elastic/x-pack-elasticsearch#270 and elastic/x-pack-elasticsearch#869 (which is also now re-enabled).
relates elastic/x-pack-elasticsearch#270 Original commit: elastic/x-pack-elasticsearch@2e52efd601
This commit is contained in:
parent
f4b32bef8c
commit
bce8d6f9e6
|
@ -64,7 +64,6 @@ public class ExpirationCallbackTests extends ESTestCase {
|
|||
assertThat(pre.delay(expiryDuration.millis() + now, now), equalTo(TimeValue.timeValueMillis(0)));
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/869")
|
||||
public void testPreExpirationScheduleTime() throws Exception {
|
||||
TimeValue expiryDuration = TimeValue.timeValueSeconds(randomIntBetween(5, 10));
|
||||
TimeValue min = TimeValue.timeValueSeconds(1);
|
||||
|
@ -117,7 +116,7 @@ public class ExpirationCallbackTests extends ESTestCase {
|
|||
assertThat(expirationCallback.nextScheduledTimeForExpiry(expiryDate, now, now + validTriggerInterval),
|
||||
equalTo(now + validTriggerInterval + expirationCallback.getFrequency()));
|
||||
|
||||
int deltaBeforeEarliestMatch = between(1, earliestValidTriggerDelay);
|
||||
int deltaBeforeEarliestMatch = between(1, earliestValidTriggerDelay - 1);
|
||||
assertThat(expirationCallback.nextScheduledTimeForExpiry(expiryDate, now, now + deltaBeforeEarliestMatch),
|
||||
equalTo(now + deltaBeforeEarliestMatch +
|
||||
expirationCallback.delay(expiryDate, now + deltaBeforeEarliestMatch).getMillis()));
|
||||
|
|
Loading…
Reference in New Issue