Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.logging.Level;
Expand All @@ -12,7 +13,9 @@ public class ArchivePVOptions {
private static final Logger logger = Logger.getLogger(ArchivePVOptions.class.getName());

private String pv;
@JsonProperty("samplingmethod")
private String samplingMethod;
@JsonProperty("samplingperiod")
private String samplingPeriod;
private String policy;
@JsonIgnore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void archivePVJson() throws JsonProcessingException {
ObjectMapper objectMapper = new ObjectMapper();
String str = objectMapper.writeValueAsString(List.of(ar1, ar2));

String expectedString = "[{\"pv\":\"sim://testing1\",\"samplingMethod\":\"MONITOR\",\"samplingPeriod\":\"1.0\"},{\"pv\":\"sim://testing2\",\"samplingMethod\":\"SCAN\",\"samplingPeriod\":\"0.2\"}]";
String expectedString = "[{\"pv\":\"sim://testing1\",\"samplingmethod\":\"MONITOR\",\"samplingperiod\":\"1.0\"},{\"pv\":\"sim://testing2\",\"samplingmethod\":\"SCAN\",\"samplingperiod\":\"0.2\"}]";
Assertions.assertEquals(str, expectedString);

// Only a pv name
Expand Down
Loading