From 44c53555911b1b186d15a087c08f02ae37abccac Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 19 Oct 2019 15:14:26 +0200 Subject: [PATCH] Fix unstable AutomationIntegrationJsonTest (#1146) Sometimes the method returns null causing the test to fail because waitForAssert doesn't catch NPEs. Signed-off-by: Wouter Born --- .../integration/test/AutomationIntegrationJsonTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java index 24d1d1adf..a16697e7a 100644 --- a/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java +++ b/itests/org.openhab.core.automation.integration.tests/src/main/java/org/openhab/core/automation/integration/test/AutomationIntegrationJsonTest.java @@ -341,6 +341,7 @@ public class AutomationIntegrationJsonTest extends JavaOSGiTest { assertThat(ruleRegistry.getAll().isEmpty(), is(false)); Rule r = ruleRegistry.get("ItemSampleRule"); assertThat(r, is(notNullValue())); + assertThat(ruleManager.getStatusInfo(r.getUID()), is(notNullValue())); assertThat(ruleManager.getStatusInfo(r.getUID()).getStatus(), is(RuleStatus.IDLE)); }, 9000, 200);