mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
fix junit status race condition (#16886)
Signed-off-by: Bernd Weymann <bernd.weymann@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
8aa2f34f3b
commit
888bea9a0a
@ -247,11 +247,20 @@ class PegelTest {
|
|||||||
|
|
||||||
tsi = callback.getThingStatus();
|
tsi = callback.getThingStatus();
|
||||||
assertNotNull(tsi);
|
assertNotNull(tsi);
|
||||||
assertEquals(ThingStatus.UNKNOWN, tsi.getStatus(), "Status");
|
// In function initialize scheduler is started.
|
||||||
assertEquals(ThingStatusDetail.NONE, tsi.getStatusDetail(), "Detail");
|
// If schedule took place status is ONLINE else UNKNOWN
|
||||||
description = tsi.getDescription();
|
switch (tsi.getStatus()) {
|
||||||
assertNotNull(description);
|
case UNKNOWN:
|
||||||
assertEquals("@text/pegelonline.handler.status.wait-feedback", description, "Description");
|
assertEquals(ThingStatusDetail.NONE, tsi.getStatusDetail(), "Detail");
|
||||||
|
description = tsi.getDescription();
|
||||||
|
assertNotNull(description);
|
||||||
|
assertEquals("@text/pegelonline.handler.status.wait-feedback", description, "Description");
|
||||||
|
break;
|
||||||
|
case ONLINE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
|
||||||
handler.dispose();
|
handler.dispose();
|
||||||
config = new Configuration();
|
config = new Configuration();
|
||||||
|
Loading…
Reference in New Issue
Block a user