Skip to content

Commit

Permalink
[modbus] Re-enable itests after core change (openhab#15017)
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
  • Loading branch information
holgerfriedrich authored and austvik committed Mar 27, 2024
1 parent 12135b7 commit 0b5ae43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.openhab.core.events.Event;
import org.openhab.core.events.EventFilter;
import org.openhab.core.events.EventSubscriber;
import org.openhab.core.i18n.UnitProvider;
import org.openhab.core.io.transport.modbus.ModbusCommunicationInterface;
import org.openhab.core.io.transport.modbus.ModbusManager;
import org.openhab.core.items.Item;
Expand Down Expand Up @@ -118,6 +119,7 @@ public void receive(Event event) {
private final Logger logger = LoggerFactory.getLogger(AbstractModbusOSGiTest.class);

protected @Mock @NonNullByDefault({}) ModbusManager mockedModbusManager;
protected @Mock @NonNullByDefault({}) UnitProvider mockedUnitProvider;
protected @NonNullByDefault({}) ModbusManager realModbusManager;
protected @NonNullByDefault({}) ManagedThingProvider thingProvider;
protected @NonNullByDefault({}) ManagedItemProvider itemProvider;
Expand Down Expand Up @@ -156,7 +158,7 @@ public void setUpAbstractModbusOSGiTest() {
itemChannelLinkRegistry = getService(ItemChannelLinkRegistry.class);
assertThat("Could not get ItemChannelLinkRegistry", itemChannelLinkRegistry, is(notNullValue()));

coreItemFactory = new CoreItemFactory();
coreItemFactory = new CoreItemFactory(mockedUnitProvider);

// Clean slate for all tests
reset(mockedModbusManager);
Expand Down
4 changes: 1 addition & 3 deletions itests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
<module>org.openhab.binding.hue.tests</module>
<module>org.openhab.binding.max.tests</module>
<module>org.openhab.binding.mielecloud.tests</module>
<!-- Modbus tests disabled until fixed (CoreItemFactory)
<module>org.openhab.binding.modbus.tests</module>
-->
<module>org.openhab.binding.modbus.tests</module>
<module>org.openhab.binding.mqtt.homeassistant.tests</module>
<module>org.openhab.binding.mqtt.homie.tests</module>
<!-- MQTT ruuvigateway tests disabled until fixed (CoreItemFactory + NumberItem)
Expand Down

0 comments on commit 0b5ae43

Please sign in to comment.