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>
This commit is contained in:
parent
c6e40272c1
commit
54ba2c732b
@ -247,11 +247,20 @@ class PegelTest {
|
||||
|
||||
tsi = callback.getThingStatus();
|
||||
assertNotNull(tsi);
|
||||
assertEquals(ThingStatus.UNKNOWN, tsi.getStatus(), "Status");
|
||||
assertEquals(ThingStatusDetail.NONE, tsi.getStatusDetail(), "Detail");
|
||||
description = tsi.getDescription();
|
||||
assertNotNull(description);
|
||||
assertEquals("@text/pegelonline.handler.status.wait-feedback", description, "Description");
|
||||
// In function initialize scheduler is started.
|
||||
// If schedule took place status is ONLINE else UNKNOWN
|
||||
switch (tsi.getStatus()) {
|
||||
case UNKNOWN:
|
||||
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();
|
||||
config = new Configuration();
|
||||
|
Loading…
Reference in New Issue
Block a user