fixed test where rolling arg is NaN
This commit is contained in:
parent
6f22bbface
commit
300650ceb6
@ -151,7 +151,7 @@ public class ScriptCalculatedFieldStateTest {
|
||||
}
|
||||
|
||||
private TsRollingArgumentEntry createRollingArgEntry() {
|
||||
TsRollingArgumentEntry argumentEntry = new TsRollingArgumentEntry();
|
||||
TsRollingArgumentEntry argumentEntry = new TsRollingArgumentEntry(5, 30000L);
|
||||
long ts = System.currentTimeMillis();
|
||||
|
||||
TreeMap<Long, Double> values = new TreeMap<>();
|
||||
|
||||
@ -79,9 +79,8 @@ public class TsRollingArgumentEntryTest {
|
||||
void testUpdateEntryWhenValueIsNotNumber() {
|
||||
SingleValueArgumentEntry newEntry = new SingleValueArgumentEntry(ts - 10, new StringDataEntry("key", "string"), 123L);
|
||||
|
||||
assertThatThrownBy(() -> entry.updateEntry(newEntry))
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessage("Time series rolling arguments supports only numeric values.");
|
||||
assertThat(entry.updateEntry(newEntry)).isTrue();
|
||||
assertThat(entry.getTsRecords().get(ts - 10)).isNaN();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user