Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Velbus test bug fixes

Rich Turnere1d86d9c6e8d
diff --git a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy
index f8a41e198..f7ad629bf 100644
--- a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy
+++ b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy
@@ -25,6 +25,7 @@ import org.openremote.agent.protocol.velbus.device.*
import org.openremote.container.Container
import org.openremote.container.concurrent.ContainerScheduledExecutor
import org.openremote.model.asset.agent.ConnectionStatus
+import org.openremote.model.attribute.AttributeExecuteStatus
import spock.lang.Shared
import spock.lang.Specification
import spock.util.concurrent.PollingConditions
@@ -39,7 +40,7 @@ class VelbusBasicTest extends Specification {
def static MockVelbusClient messageProcessor = new MockVelbusClient()
@Shared
- def static PollingConditions conditions = new PollingConditions(timeout: 20, delay: 0.2)
+ def static PollingConditions conditions = new PollingConditions(timeout: 5, delay: 0.2)
static loadDevicePackets(MockVelbusClient messageProcessor) {
messageProcessor.mockPackets = [
@@ -2032,7 +2033,7 @@ class VelbusBasicTest extends Specification {
}
when: "the counter is reset"
- device.writeProperty("COUNTER1", 0d)
+ device.writeProperty("COUNTER1_RESET", AttributeExecuteStatus.REQUEST_START)
then: "the counter should update to match"
conditions.eventually {
diff --git a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusProtocolTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusProtocolTest.groovy
index 4317d51d8..5315942a2 100644
--- a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusProtocolTest.groovy
+++ b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusProtocolTest.groovy
@@ -110,7 +110,7 @@ class VelbusProtocolTest extends Specification implements ManagerContainerTrait
def "Check linked attribute import"() {
given: "the server container is started"
- def conditions = new PollingConditions(timeout: 90, delay: 0.5)
+ def conditions = new PollingConditions(timeout: 60, delay: 0.5)
def container = startContainer(defaultConfig(), defaultServices())
def assetStorageService = container.getService(AssetStorageService.class)
def agentService = container.getService(AgentService.class)
@@ -180,7 +180,7 @@ class VelbusProtocolTest extends Specification implements ManagerContainerTrait
and: "all imported assets should be fully linked"
conditions.eventually {
- assert agentService.getProtocolInstance(agent.id).linkedAttributes.size() == 1138
+ assert agentService.getProtocolInstance(agent.id).linkedAttributes.size() == 1163
}
when: "agent and imported assets are removed"