From d903bf9e3262adf2a8036ca3337bd07b1c278358 Mon Sep 17 00:00:00 2001 From: gwen-soleil Date: Wed, 22 Jul 2020 15:23:02 +0200 Subject: [PATCH] fix regression in tests --- .../org/tango/server/testserver/JTangoTest.java | 13 +++++++++---- .../org/tango/server/testserver/HistoryTest.java | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/tango/server/testserver/JTangoTest.java b/server/src/main/java/org/tango/server/testserver/JTangoTest.java index 4576acdf..df38dfbc 100644 --- a/server/src/main/java/org/tango/server/testserver/JTangoTest.java +++ b/server/src/main/java/org/tango/server/testserver/JTangoTest.java @@ -389,7 +389,7 @@ public void delete() throws DevFailed { * * @return shortScalar attribute */ - @Attribute(isPolled = true, pollingPeriod = 0) + @Attribute public short getShortScalar() { return shortScalar; } @@ -783,6 +783,11 @@ 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]; @@ -790,10 +795,10 @@ public void fillHistory() throws DevFailed { //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); } /** diff --git a/server/src/test/java/org/tango/server/testserver/HistoryTest.java b/server/src/test/java/org/tango/server/testserver/HistoryTest.java index 37155042..508d972f 100644 --- a/server/src/test/java/org/tango/server/testserver/HistoryTest.java +++ b/server/src/test/java/org/tango/server/testserver/HistoryTest.java @@ -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));