Skip to content

armgit / core

Public Imported from GitHub
0

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

Fix unstable SimulatorProtocolTest (#2321)

Wouter Bornd0a0f5a83024
diff --git a/test/src/test/groovy/org/openremote/test/protocol/simulator/SimulatorProtocolTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/simulator/SimulatorProtocolTest.groovy
index 3642a255b..695dfaa61 100644
--- a/test/src/test/groovy/org/openremote/test/protocol/simulator/SimulatorProtocolTest.groovy
+++ b/test/src/test/groovy/org/openremote/test/protocol/simulator/SimulatorProtocolTest.groovy
@@ -105,6 +105,11 @@ class SimulatorProtocolTest extends Specification implements ManagerContainerTra
// Create and link asset to agent
agent = new SimulatorAgent("Test agent").setRealm(Constants.MASTER_REALM)
agent = assetStorageService.merge(agent)
+
+ // Wait until agent is connected before resetting the clock so attribute events are processed correctly
+ conditions.eventually {
+ assetStorageService.find(agent.getId(), Agent.class).getAgentStatus().orElse(null) == ConnectionStatus.CONNECTED
+ }
}
def setup() {