Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AutomationIntegrationJsonTest #3760

Merged
merged 2 commits into from
Aug 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ public void assertThatARuleFromJsonFileIsAddedAutomatically() {
}

@Test
public void assertThatARuleFromJsonFileIsAddedAutomaticallyAndTheRuntimeRuleHasResolvedModuleReferences() {
public void assertThatARuleFromJsonFileIsAddedAutomaticallyAndTheRuntimeRuleHasResolvedModuleReferences()
throws InterruptedException {
logger.info(
"assert that a rule from json file is added automatically and the runtime rule has resolved module references");

Expand Down Expand Up @@ -333,6 +334,7 @@ public void receive(Event e) {
};

registerService(itemEventHandler);
Thread.sleep(1000);
eventPublisher.post(ItemEventFactory.createStateEvent("myMotionItem", OnOffType.ON));
waitForAssert(() -> {
assertThat(itemEvent, is(notNullValue()));
Expand All @@ -342,7 +344,7 @@ public void receive(Event e) {
}

@Test
public void assertThatARuleFromJsonFileIsExecutedCorrectly() throws ItemNotFoundException {
public void assertThatARuleFromJsonFileIsExecutedCorrectly() throws ItemNotFoundException, InterruptedException {
logger.info("assert that rule added by json is executed correctly");
waitForAssert(() -> {
assertThat(ruleRegistry.getAll().isEmpty(), is(false));
Expand Down Expand Up @@ -378,6 +380,7 @@ public void receive(Event e) {
};

registerService(eventHandler);
Thread.sleep(1000);
eventPublisher.post(ItemEventFactory.createStateEvent("myMotionItem", OnOffType.ON));
waitForAssert(() -> {
assertThat(itemEvent, is(notNullValue()));
Expand Down