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
Minor test bug fix
Rich Turner8c66640922f7
diff --git a/manager/src/main/java/org/openremote/manager/setup/builtin/ManagerDemoSetup.java b/manager/src/main/java/org/openremote/manager/setup/builtin/ManagerDemoSetup.javaindex 75fcd4a27..d4f6f2e31 100644--- a/manager/src/main/java/org/openremote/manager/setup/builtin/ManagerDemoSetup.java+++ b/manager/src/main/java/org/openremote/manager/setup/builtin/ManagerDemoSetup.java@@ -19,7 +19,6 @@*/package org.openremote.manager.setup.builtin;-import org.apache.commons.io.IOUtils;import org.openremote.agent.protocol.simulator.SimulatorProtocol;import org.openremote.container.Container;import org.openremote.container.util.UniqueIdentifierGenerator;@@ -31,7 +30,6 @@ import org.openremote.model.asset.AssetAttribute;import org.openremote.model.asset.UserAsset;import org.openremote.model.attribute.*;import org.openremote.model.geo.GeoJSONPoint;-import org.openremote.model.rules.AssetRuleset;import org.openremote.model.security.Tenant;import org.openremote.model.simulator.element.ColorSimulatorElement;import org.openremote.model.simulator.element.NumberSimulatorElement;@@ -39,10 +37,6 @@ import org.openremote.model.simulator.element.SwitchSimulatorElement;import org.openremote.model.value.ObjectValue;import org.openremote.model.value.Values;-import java.nio.charset.StandardCharsets;-import java.time.LocalDateTime;-import java.time.ZoneId;-import java.time.ZonedDateTime;import java.util.Arrays;import java.util.List;@@ -51,7 +45,6 @@ import static org.openremote.model.asset.AssetType.*;import static org.openremote.model.asset.agent.ProtocolConfiguration.initProtocolConfiguration;import static org.openremote.model.attribute.AttributeValueType.*;import static org.openremote.model.attribute.MetaItemType.*;-import static org.openremote.model.rules.Ruleset.Lang.GROOVY;public class ManagerDemoSetup extends AbstractManagerSetup {@@ -61,7 +54,7 @@ public class ManagerDemoSetup extends AbstractManagerSetup {public static final int DEMO_RULE_STATES_APARTMENT_3 = 0;public static final int DEMO_RULE_STATES_SMART_OFFICE = 1;public static final int DEMO_RULE_STATES_SMART_BUILDING = DEMO_RULE_STATES_APARTMENT_1 + DEMO_RULE_STATES_APARTMENT_2 + DEMO_RULE_STATES_APARTMENT_3;- public static final int DEMO_RULE_STATES_SMART_CITY = 47;+ public static final int DEMO_RULE_STATES_SMART_CITY = 45;public static final int DEMO_RULE_STATES_GLOBAL = DEMO_RULE_STATES_SMART_BUILDING + DEMO_RULE_STATES_SMART_OFFICE + DEMO_RULE_STATES_SMART_CITY;public static final int DEMO_RULE_STATES_APARTMENT_1_WITH_SCENES = DEMO_RULE_STATES_APARTMENT_1 + 28;public static final int DEMO_RULE_STATES_SMART_BUILDING_WITH_SCENES = DEMO_RULE_STATES_APARTMENT_1_WITH_SCENES + DEMO_RULE_STATES_APARTMENT_2 + DEMO_RULE_STATES_APARTMENT_3;diff --git a/test/src/test/groovy/org/openremote/test/rules/residence/ResidenceAutoVentilationTest.groovy b/test/src/test/groovy/org/openremote/test/rules/residence/ResidenceAutoVentilationTest.groovyindex 10130a6e0..d54952aa0 100644--- a/test/src/test/groovy/org/openremote/test/rules/residence/ResidenceAutoVentilationTest.groovy+++ b/test/src/test/groovy/org/openremote/test/rules/residence/ResidenceAutoVentilationTest.groovy@@ -105,6 +105,8 @@ class ResidenceAutoVentilationTest extends Specification implements ManagerContamanagerDemoSetup.apartment1LivingroomId, "co2Level", Values.create(500))simulatorProtocol.putValue(co2LevelDecrement)++ then: "the decreasing CO2 should have been detected in rules"conditions.eventually {assert apartment1Engine.assetEvents.any() {it.fact.matches(co2LevelDecrement, SENSOR, true)@@ -112,7 +114,7 @@ class ResidenceAutoVentilationTest extends Specification implements ManagerContaassert noEventProcessedIn(assetProcessingService, 500)}- and: "time advances"+ when: "time advances"advancePseudoClock(35, MINUTES, container)then: "ventilation level of the apartment should be LOW"