openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.6k forks source link

[mielecloud] Integration tests failure #13938

Open jlaur opened 1 year ago

jlaur commented 1 year ago

Today it failed in this Ubuntu 22.04 CI build: https://github.com/openhab/openhab-addons/actions/runs/3679100300/jobs/6223149500

TEST org.openhab.binding.mielecloud.internal.handler.DryerDeviceThingHandlerTest#testActionsChannelUpdatesForValidValues() <<< ERROR: expected: <ON> but was: <NULL>
org.opentest4j.AssertionFailedError: expected: <ON> but was: <NULL>
    at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
    at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
    at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
    at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
    at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1141)
    at org.openhab.binding.mielecloud.internal.handler.DryerDeviceThingHandlerTest.lambda$5(DryerDeviceThingHandlerTest.java:246)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:245)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:213)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:177)
    at org.openhab.binding.mielecloud.internal.handler.AbstractMieleThingHandlerTest.waitForAssert(AbstractMieleThingHandlerTest.java:137)
    at org.openhab.binding.mielecloud.internal.handler.DryerDeviceThingHandlerTest.testActionsChannelUpdatesForValidValues(DryerDeviceThingHandlerTest.java:245)

Originally posted by @wborn in https://github.com/openhab/openhab-addons/issues/12627#issuecomment-1347312919

BjoernLange commented 1 year ago

I will have another look at this. However, I was not able to reproduce the issue in a local build, so any help doing this is appreciated. What I can tell from a quick look at the logs is that some channel state updates sometimes don't seem to get through in the integration tests.

jlaur commented 1 year ago

One more: https://github.com/openhab/openhab-addons/actions/runs/3719345202/jobs/6308147859

BjoernLange commented 1 year ago

Thank you for tracking this @jlaur. I had a close look at both logs but don't see anything immediate that tells where the problem is coming from. Is it possible to increase the log verbosity when running the integration tests just for the Miele Cloud binding? Maybe that helps finding out whats going wrong.

jlaur commented 1 year ago

@BjoernLange - recently the integration tests started to fail consistently on every build. Would it be possible to have another look? See for example: https://ci.openhab.org/view/Pull%20Request%20Builds/job/PR-openHAB-Addons/lastFailedBuild/org.openhab.addons.itests$org.openhab.binding.mielecloud.tests/console

J-N-K commented 1 year ago
TEST org.openhab.binding.mielecloud.internal.config.ConfigFlowTest#configFlowHappyPathCreatesABridge() <<< ERROR: Could not find "name="redirect_uri"" in 

That's where they fail locally.

BjoernLange commented 1 year ago

At first glance the recent test failures are unrelated to the failures described in this issue, will have a look at that anyway. Thanks for disabling the failing tests @J-N-K!

wborn commented 1 year ago

Another failure, see: https://github.com/openhab/openhab-addons/actions/runs/4715077173/jobs/8361822897

TEST org.openhab.binding.mielecloud.internal.handler.WineStorageDeviceThingHandlerTest#testChannelUpdatesForNullValues() <<< ERROR: expected: <UNDEF> but was: <NULL>
org.opentest4j.AssertionFailedError: expected: <UNDEF> but was: <NULL>
    at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
    at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
    at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
    at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
    at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
    at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1142)
    at org.openhab.binding.mielecloud.internal.handler.WineStorageDeviceThingHandlerTest.lambda$0(WineStorageDeviceThingHandlerTest.java:75)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:245)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:213)
    at org.openhab.core.test.java.JavaTest.waitForAssert(JavaTest.java:177)
    at org.openhab.binding.mielecloud.internal.handler.AbstractMieleThingHandlerTest.waitForAssert(AbstractMieleThingHandlerTest.java:137)
    at org.openhab.binding.mielecloud.internal.handler.WineStorageDeviceThingHandlerTest.testChannelUpdatesForNullValues(WineStorageDeviceThingHandlerTest.java:72)