From 92310fab2ffa6bb807148d598aa1f0f74fe55aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lange?= Date: Sat, 10 Dec 2022 09:40:50 +0100 Subject: [PATCH] [mielecloud] Remove things after each integration test (#13875) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Lange --- .../internal/handler/AbstractMieleThingHandlerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java index 6e03ddcacee..8d408b83ee6 100644 --- a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java +++ b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java @@ -27,6 +27,7 @@ import java.util.Optional; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openhab.binding.mielecloud.internal.MieleCloudBindingConstants; @@ -366,6 +367,12 @@ public abstract class AbstractMieleThingHandlerTest extends JavaOSGiTest { */ protected abstract AbstractMieleThingHandler setUpThingHandler(); + @AfterEach + public void tearDownAbstractMieleThingHandlerTest() { + getThingRegistry().forceRemove(getThingHandler().getThing().getUID()); + getThingRegistry().forceRemove(getBridge().getUID()); + } + @Test public void testCachedStateIsQueriedOnInitialize() throws Exception { // given: