[wemo] Fix thing status transitions (#12416)

* Fix status transitions

Fixes #12415

* Fix integration tests
* Fix missing status update for some devices after HTTP call

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen
2022-03-05 01:08:45 +01:00
committed by GitHub
parent 3ed28ae745
commit a3b6f74764
10 changed files with 22 additions and 33 deletions

View File

@@ -75,7 +75,7 @@ public class WemoHandlerOSGiTest extends GenericWemoOSGiTest {
Thing thing = createThing(THING_TYPE_UID, DEFAULT_TEST_CHANNEL, DEFAULT_TEST_CHANNEL_TYPE);
waitForAssert(() -> {
assertThat(thing.getStatus(), is(ThingStatus.ONLINE));
assertThat(thing.getStatus(), is(ThingStatus.UNKNOWN));
});
// The device is registered as UPnP Device after the initialization, this will ensure that the polling job will
@@ -111,7 +111,7 @@ public class WemoHandlerOSGiTest extends GenericWemoOSGiTest {
Thing thing = createThing(THING_TYPE_UID, DEFAULT_TEST_CHANNEL, DEFAULT_TEST_CHANNEL_TYPE);
waitForAssert(() -> {
assertThat(thing.getStatus(), is(ThingStatus.ONLINE));
assertThat(thing.getStatus(), is(ThingStatus.OFFLINE));
});
// The device is registered as UPnP Device after the initialization, this will ensure that the polling job will

View File

@@ -160,7 +160,7 @@ public class WemoLightHandlerOSGiTest extends GenericWemoLightOSGiTestParent {
});
waitForAssert(() -> {
assertThat(thing.getStatus(), is(ThingStatus.ONLINE));
assertThat(thing.getStatus(), is(ThingStatus.UNKNOWN));
});
// The device is registered as UPnP Device after the initialization, this will ensure that the polling job will

View File

@@ -76,7 +76,7 @@ public class WemoMakerHandlerOSGiTest extends GenericWemoOSGiTest {
Thing thing = createThing(THING_TYPE_UID, DEFAULT_TEST_CHANNEL, DEFAULT_TEST_CHANNEL_TYPE);
waitForAssert(() -> {
assertThat(thing.getStatus(), is(ThingStatus.ONLINE));
assertThat(thing.getStatus(), is(ThingStatus.OFFLINE));
});
// The Device is registered as UPnP Device after the initialization, this will ensure that the polling job will
@@ -112,7 +112,7 @@ public class WemoMakerHandlerOSGiTest extends GenericWemoOSGiTest {
Thing thing = createThing(THING_TYPE_UID, DEFAULT_TEST_CHANNEL, DEFAULT_TEST_CHANNEL_TYPE);
waitForAssert(() -> {
assertThat(thing.getStatus(), is(ThingStatus.ONLINE));
assertThat(thing.getStatus(), is(ThingStatus.OFFLINE));
});
// The Device is registered as UPnP Device after the initialization, this will ensure that the polling job will