Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
fix regression in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen-soleil committed Jul 22, 2020
1 parent 2037f01 commit d903bf9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions server/src/main/java/org/tango/server/testserver/JTangoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public void delete() throws DevFailed {
*
* @return shortScalar attribute
*/
@Attribute(isPolled = true, pollingPeriod = 0)
@Attribute
public short getShortScalar() {
return shortScalar;
}
Expand Down Expand Up @@ -783,17 +783,22 @@ public int[] testPollingArray() {
public void testState() {
}

@Attribute(isPolled = true, pollingPeriod = 0)
public short getFillHistory() {
return 0;
}

@Command
public void fillHistory() throws DevFailed {
AttributeValue[] values = new AttributeValue[3];
// FIXME client API does not support null values in history even with errors
//DevFailed[] errors = new DevFailed[3];
for (int i = 0; i < values.length; i++) {
values[i] = new AttributeValue();
values[i].setValue((short)i);
// errors[i] = DevFailedUtils.newDevFailed("test");
values[i].setValue((short) i);
// errors[i] = DevFailedUtils.newDevFailed("test");
}
deviceManager.fillAttributeHistory("shortScalar", values, values, null);
deviceManager.fillAttributeHistory("fillHistory", values, values, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void fillHistory() throws DevFailed {
DeviceProxy dev = new DeviceProxy(deviceName);
TangoCommand cmd = new TangoCommand(deviceName, "fillHistory");
cmd.execute();
DeviceDataHistory[] history = dev.attribute_history("shortScalar");
DeviceDataHistory[] history = dev.attribute_history("fillHistory");
for (int i = 0; i < history.length; i++) {
// System.out.println(history[i].getErrStack());
assertThat(history[i].extractShort(), equalTo((short) i));
Expand Down

0 comments on commit d903bf9

Please sign in to comment.