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 <github@maindrain.net>
This commit is contained in:
Wouter Born 2019-10-19 15:14:26 +02:00 committed by Kai Kreuzer
parent aa4456425a
commit 44c5355591

View File

@ -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);