From 235a719ed9412a95d2edf9a99333e0f8da57de4a Mon Sep 17 00:00:00 2001 From: Fabian Wolter Date: Tue, 29 Dec 2020 14:42:17 +0100 Subject: [PATCH] [feed] Try to make tests more stable (#9565) Signed-off-by: Fabian Wolter --- .../openhab/binding/feed/test/FeedHandlerTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/itests/org.openhab.binding.feed.tests/src/main/java/org/openhab/binding/feed/test/FeedHandlerTest.java b/itests/org.openhab.binding.feed.tests/src/main/java/org/openhab/binding/feed/test/FeedHandlerTest.java index d25a832d0c3..d2af30702c6 100644 --- a/itests/org.openhab.binding.feed.tests/src/main/java/org/openhab/binding/feed/test/FeedHandlerTest.java +++ b/itests/org.openhab.binding.feed.tests/src/main/java/org/openhab/binding/feed/test/FeedHandlerTest.java @@ -169,11 +169,13 @@ public class FeedHandlerTest extends JavaOSGiTest { unregisterFeedTestServlet(); - // Wait for FeedHandler to be unregistered - waitForAssert(() -> { - feedHandler = (FeedHandler) feedThing.getHandler(); - assertThat(feedHandler, is(nullValue())); - }); + if (feedThing != null) { + // Wait for FeedHandler to be unregistered + waitForAssert(() -> { + feedHandler = (FeedHandler) feedThing.getHandler(); + assertThat(feedHandler, is(nullValue())); + }); + } } private synchronized void registerFeedTestServlet() {