fixed updating entry with old telemetry
This commit is contained in:
parent
9567e9e0ce
commit
d8a7f97397
@ -107,7 +107,7 @@ public class SingleValueArgumentEntry implements ArgumentEntry {
|
||||
@Override
|
||||
public boolean updateEntry(ArgumentEntry entry) {
|
||||
if (entry instanceof SingleValueArgumentEntry singleValueEntry) {
|
||||
if (singleValueEntry.getTs() == this.ts) {
|
||||
if (singleValueEntry.getTs() <= this.ts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ public class SingleValueArgumentEntryTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUpdateEntryWithThaSameTs() {
|
||||
void testUpdateEntryWithTheSameTs() {
|
||||
assertThat(entry.updateEntry(new SingleValueArgumentEntry(ts, new LongDataEntry("key", 13L), 363L))).isFalse();
|
||||
}
|
||||
|
||||
@ -81,6 +81,11 @@ public class SingleValueArgumentEntryTest {
|
||||
assertThat(entry.updateEntry(new SingleValueArgumentEntry(ts + 18, new LongDataEntry("key", 11L), 364L))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUpdateEntryWithOldTs() {
|
||||
assertThat(entry.updateEntry(new SingleValueArgumentEntry(ts - 10, new LongDataEntry("key", 14L), 365L))).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToTbelCfArgWhenJsonIsObject() {
|
||||
entry = new SingleValueArgumentEntry(ts, new JsonDataEntry("key", "{\"test\": 10}"), 370L);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user