Skip to content

Commit f9474c1

Browse files
committed
Fix test
1 parent 09c83a8 commit f9474c1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamLifecycleTests.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ public void testEffectiveRetention() {
330330
DataStreamLifecycle noFailuresRetentionLifecycle = DataStreamLifecycle.failuresLifecycleBuilder().build();
331331
TimeValue maxRetention = TimeValue.timeValueDays(randomIntBetween(50, 100));
332332
TimeValue defaultRetention = TimeValue.timeValueDays(randomIntBetween(1, 50));
333-
TimeValue failuresDefaultRetention = TimeValue.timeValueDays(randomIntBetween(1, 100));
334333

335334
// No global retention
336335
// Data lifecycle
@@ -372,13 +371,8 @@ public void testEffectiveRetention() {
372371
new DataStreamGlobalRetention(defaultRetention, maxRetention),
373372
false
374373
);
375-
if (maxRetention.getMillis() < failuresDefaultRetention.getMillis()) {
376-
assertThat(effectiveFailuresRetentionWithSource.v1(), equalTo(maxRetention));
377-
assertThat(effectiveFailuresRetentionWithSource.v2(), equalTo(MAX_GLOBAL_RETENTION));
378-
} else {
379-
assertThat(effectiveFailuresRetentionWithSource.v1(), equalTo(failuresDefaultRetention));
380-
assertThat(effectiveFailuresRetentionWithSource.v2(), equalTo(DEFAULT_GLOBAL_RETENTION));
381-
}
374+
assertThat(effectiveFailuresRetentionWithSource.v1(), equalTo(defaultRetention));
375+
assertThat(effectiveFailuresRetentionWithSource.v2(), equalTo(DEFAULT_GLOBAL_RETENTION));
382376
}
383377

384378
// With retention in the data stream lifecycle

0 commit comments

Comments
 (0)