100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Improve test robustness
Rich Turner230270e5152d
diff --git a/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy b/test/src/main/groovy/org/openremote/test/ContainerTrait.groovyindex df6d92610..4262c9ad6 100644--- a/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy+++ b/test/src/main/groovy/org/openremote/test/ContainerTrait.groovy@@ -164,7 +164,8 @@ trait ContainerTrait {rulesetStorageService.delete(GlobalRuleset.class, it.id)def rulesStopped = falsewhile (!rulesStopped) {- rulesStopped = rulesService.globalEngine == null || !rulesService.globalEngine.deployments.containsKey(it.id)+ def engine = rulesService.globalEngine+ rulesStopped = engine == null || !engine.deployments.containsKey(it.id)if (counter++ > 100) {throw new IllegalStateException("Failed to purge ruleset: " + it.name)}@@ -177,7 +178,7 @@ trait ContainerTrait {counter = 0def enginesStopped = falsewhile (!enginesStopped) {- enginesStopped = rulesService.globalEngine == null && rulesService.tenantEngines.isEmpty() && rulesService.assetEngines.isEmpty()+ enginesStopped = rulesService.tenantEngines == null && rulesService.tenantEngines.isEmpty() && rulesService.assetEngines.isEmpty()if (counter++ > 100) {throw new IllegalStateException("Rule engines have failed to stop")}