Skip to content

Commit

Permalink
fix itests
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Cutrer <[email protected]>
  • Loading branch information
ccutrer committed Oct 7, 2024
1 parent 29d6127 commit 10a3259
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,10 @@ public void parseHATree() throws Exception {
assertNull(failure);
assertThat(haComponents.size(), is(1));

String channelGroupId = "switch_" + ThingChannelConstants.TEST_HOME_ASSISTANT_THING.getId();
String componentId = ThingChannelConstants.TEST_HOME_ASSISTANT_THING.getId();
String channelId = Switch.SWITCH_CHANNEL_ID;

State value = haComponents.get(channelGroupId).getChannel(channelGroupId).getState().getCache()
.getChannelState();
State value = haComponents.get(componentId).getChannel(channelId).getState().getCache().getChannelState();
assertThat(value, is(UnDefType.UNDEF));

haComponents.values().stream().map(e -> e.start(haConnection, scheduler, 100))
Expand All @@ -191,7 +190,7 @@ public void parseHATree() throws Exception {
verify(channelStateUpdateListener, timeout(4000).times(1)).updateChannelState(any(), any());

// Value should be ON now.
value = haComponents.get(channelGroupId).getChannel(channelGroupId).getState().getCache().getChannelState();
value = haComponents.get(componentId).getChannel(channelId).getState().getCache().getChannelState();
assertThat(value, is(OnOffType.ON));
}
}

0 comments on commit 10a3259

Please sign in to comment.