[TEST] Fix RolloverActionTests.mutateInstance
In some cases it wasn't mutating and caused test failures
@@ -55,10 +55,11 @@ public class RolloverActionTests extends AbstractActionTestCase<RolloverAction>
});
break;
case 1:
- maxAge = TimeValue.parseTimeValue(randomPositiveTimeValue(), "rollover_action_test");
+ maxAge = randomValueOtherThan(maxAge,
+ () -> TimeValue.parseTimeValue(randomPositiveTimeValue(), "rollover_action_test"));
break;
case 2:
- maxDocs = randomNonNegativeLong();
+ maxDocs = maxDocs == null ? randomNonNegativeLong() : maxDocs + 1;
break;
default:
throw new AssertionError("Illegal randomisation branch");
