mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Report the actual interval that was sent if less than 1000ms.
This change reports the actual interval that was used instead of just reporting the ms of the interval if the interval was less than 1000ms. Fixes elastic/elasticsearch#301 Original commit: elastic/x-pack-elasticsearch@d625c952fe
This commit is contained in:
parent
d0d646aa4c
commit
9df97fe845
@ -25,7 +25,7 @@ public class IntervalSchedule implements Schedule {
|
||||
|
||||
public IntervalSchedule(Interval interval) {
|
||||
if (interval.millis < 1000) {
|
||||
throw new ScheduleTriggerException("interval can't be lower than 1000 ms, but [{}] was specified", interval.millis);
|
||||
throw new ScheduleTriggerException("interval can't be lower than 1000 ms, but [{}] was specified", interval);
|
||||
}
|
||||
this.interval = interval;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ public class BasicWatcherTests extends AbstractWatcherIntegrationTests {
|
||||
.get();
|
||||
fail("put watch should have failed");
|
||||
} catch (ScheduleTriggerException e) {
|
||||
assertThat(e.getMessage(), equalTo("interval can't be lower than 1000 ms, but [-5000] was specified"));
|
||||
assertThat(e.getMessage(), equalTo("interval can't be lower than 1000 ms, but [-5s] was specified"));
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user