Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lametrictime] Tests failing #7979

Closed
lolodomo opened this issue Jun 22, 2020 · 2 comments · Fixed by #7990
Closed

[lametrictime] Tests failing #7979

lolodomo opened this issue Jun 22, 2020 · 2 comments · Fixed by #7990
Labels
bug An unexpected problem or unintended behavior of an add-on test

Comments

@lolodomo
Copy link
Contributor

Build on Windows 10:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.openhab.binding.lametrictime.api.impl.FileIconTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 s - in org.openhab.binding.lametrictime.api.impl.FileIconTest
[INFO] Running org.openhab.binding.lametrictime.api.local.model.ActionTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.148 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.ActionTest
[ERROR] testSerialize(org.openhab.binding.lametrictime.api.local.model.ActionTest)  Time elapsed: 0.031 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "enabled": {
    "data_type": "bool"
  },
  "time": {
    "data_type": "string"
] }
}> but was:<{[
  "enabled": {
    "data_type": "bool"
  },
  "time": {
    "data_type": "string"
  }]
}>
        at org.openhab.binding.lametrictime.api.local.model.ActionTest.testSerialize(ActionTest.java:50)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.ApplicationTest
[ERROR] Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.ApplicationTest
[ERROR] testSerializeAllFields(org.openhab.binding.lametrictime.api.local.model.ApplicationTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "actions": {
    "radio.next": {},
    "radio.play": {},
    "radio.prev": {},
    "radio.stop": {}
  },
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22",
  "widgets": {
    "589ed1b3fcdaa5180bf4848e55ba8061": {}
] }
}> but was:<{[
  "actions": {
    "radio.next": {},
    "radio.play": {},
    "radio.prev": {},
    "radio.stop": {}
  },
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22",
  "widgets": {
    "589ed1b3fcdaa5180bf4848e55ba8061": {}
  }]
}>
        at org.openhab.binding.lametrictime.api.local.model.ApplicationTest.testSerializeAllFields(ApplicationTest.java:57)

[ERROR] testSerializeNullLists(org.openhab.binding.lametrictime.api.local.model.ApplicationTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
] "version_code": "22"
}> but was:<{[
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22"]
}>
        at org.openhab.binding.lametrictime.api.local.model.ApplicationTest.testSerializeNullLists(ApplicationTest.java:67)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.AudioTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.AudioTest
[ERROR] testSerializeAllFields(org.openhab.binding.lametrictime.api.local.model.AudioTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
] "volume": 42
}> but was:<{[
  "volume": 42]
}>
        at org.openhab.binding.lametrictime.api.local.model.AudioTest.testSerializeAllFields(AudioTest.java:43)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.BluetoothTest
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.BluetoothTest
[ERROR] testSerializeAllFields(org.openhab.binding.lametrictime.api.local.model.BluetoothTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "active": false,
  "mac": "AA:AA:AA:AA:AA:AA",
  "address": "AA:AA:AA:AA:AA:AA",
  "available": true,
  "discoverable": false,
  "name": "LM9999",
] "pairable": true
}> but was:<{[
  "active": false,
  "mac": "AA:AA:AA:AA:AA:AA",
  "address": "AA:AA:AA:AA:AA:AA",
  "available": true,
  "discoverable": false,
  "name": "LM9999",
  "pairable": true]
}>
        at org.openhab.binding.lametrictime.api.local.model.BluetoothTest.testSerializeAllFields(BluetoothTest.java:48)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.FrameTest
[ERROR] Tests run: 6, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.FrameTest
[ERROR] testSerializeGoal(org.openhab.binding.lametrictime.api.local.model.FrameTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "icon": "i120",
] "goalData": {}
}> but was:<{[
  "icon": "i120",
  "goalData": {}]
}>
        at org.openhab.binding.lametrictime.api.local.model.FrameTest.testSerializeGoal(FrameTest.java:51)

[ERROR] testSerializeSimple(org.openhab.binding.lametrictime.api.local.model.FrameTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "icon": "i87",
] "text": "Hello world!"
}> but was:<{[
  "icon": "i87",
  "text": "Hello world!"]
}>
        at org.openhab.binding.lametrictime.api.local.model.FrameTest.testSerializeSimple(FrameTest.java:44)

[ERROR] testSerializeChart(org.openhab.binding.lametrictime.api.local.model.FrameTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "chartData": [
    1,
    2,
    3,
    4,
    5,
    6,
    7
] ]
}> but was:<{[
  "chartData": [
    1,
    2,
    3,
    4,
    5,
    6,
    7
  ]]
}>
        at org.openhab.binding.lametrictime.api.local.model.FrameTest.testSerializeChart(FrameTest.java:58)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.GoalDataTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.GoalDataTest
[ERROR] testSerializeSimple(org.openhab.binding.lametrictime.api.local.model.GoalDataTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "start": 0,
  "current": 50,
  "end": 100,
] "unit": "%"
}> but was:<{[
  "start": 0,
  "current": 50,
  "end": 100,
  "unit": "%"]
}>
        at org.openhab.binding.lametrictime.api.local.model.GoalDataTest.testSerializeSimple(GoalDataTest.java:43)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.UpdateActionTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.UpdateActionTest
[ERROR] testSerialize(org.openhab.binding.lametrictime.api.local.model.UpdateActionTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "id": "countdown.configure",
  "params": {
    "duration": 30
] }
}> but was:<{[
  "id": "countdown.configure",
  "params": {
    "duration": 30
  }]
}>
        at org.openhab.binding.lametrictime.api.local.model.UpdateActionTest.testSerialize(UpdateActionTest.java:48)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.WidgetTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.WidgetTest
[ERROR] testSerialize(org.openhab.binding.lametrictime.api.local.model.WidgetTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "package": "com.lametric.radio",
  "index": -1,
  "settings": {
    "_title": "Radio"
] }
}> but was:<{[
  "package": "com.lametric.radio",
  "index": -1,
  "settings": {
    "_title": "Radio"
  }]
}>
        at org.openhab.binding.lametrictime.api.local.model.WidgetTest.testSerialize(WidgetTest.java:53)

[INFO] Running org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest
[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest
[ERROR] testSerialize(org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<{[
  "frames": [
    {
      "icon": "i120",
      "text": "12°",
      "index": 0
    }
] ]
}> but was:<{[
  "frames": [
    {
      "icon": "i120",
      "text": "12▒",
      "index": 0
    }
  ]]
}>
        at org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest.testSerialize(WidgetUpdatesTest.java:47)

[ERROR] testDeserialize(org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest)  Time elapsed: 0 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:<12[]▒> but was:<12[▒]▒>
        at org.openhab.binding.lametrictime.api.local.model.WidgetUpdatesTest.testDeserialize(WidgetUpdatesTest.java:57)

[INFO] Running org.openhab.binding.lametrictime.api.model.enums.BrightnessModeTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.BrightnessModeTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.DisplayTypeTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.DisplayTypeTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.IconTypeTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.IconTypeTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.IpModeTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.IpModeTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.PriorityTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.PriorityTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.SoundCategoryTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.SoundCategoryTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.SoundTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.SoundTest
[INFO] Running org.openhab.binding.lametrictime.api.model.enums.WifiEncryptionTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.openhab.binding.lametrictime.api.model.enums.WifiEncryptionTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   ActionTest.testSerialize:50 expected:<{[
  "enabled": {
    "data_type": "bool"
  },
  "time": {
    "data_type": "string"
] }
}> but was:<{[
  "enabled": {
    "data_type": "bool"
  },
  "time": {
    "data_type": "string"
  }]
}>
[ERROR]   ApplicationTest.testSerializeAllFields:57 expected:<{[
  "actions": {
    "radio.next": {},
    "radio.play": {},
    "radio.prev": {},
    "radio.stop": {}
  },
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22",
  "widgets": {
    "589ed1b3fcdaa5180bf4848e55ba8061": {}
] }
}> but was:<{[
  "actions": {
    "radio.next": {},
    "radio.play": {},
    "radio.prev": {},
    "radio.stop": {}
  },
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22",
  "widgets": {
    "589ed1b3fcdaa5180bf4848e55ba8061": {}
  }]
}>
[ERROR]   ApplicationTest.testSerializeNullLists:67 expected:<{[
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
] "version_code": "22"
}> but was:<{[
  "package": "com.lametric.radio",
  "vendor": "LaMetric",
  "version": "1.0.10",
  "version_code": "22"]
}>
[ERROR]   AudioTest.testSerializeAllFields:43 expected:<{[
] "volume": 42
}> but was:<{[
  "volume": 42]
}>
[ERROR]   BluetoothTest.testSerializeAllFields:48 expected:<{[
  "active": false,
  "mac": "AA:AA:AA:AA:AA:AA",
  "address": "AA:AA:AA:AA:AA:AA",
  "available": true,
  "discoverable": false,
  "name": "LM9999",
] "pairable": true
}> but was:<{[
  "active": false,
  "mac": "AA:AA:AA:AA:AA:AA",
  "address": "AA:AA:AA:AA:AA:AA",
  "available": true,
  "discoverable": false,
  "name": "LM9999",
  "pairable": true]
}>
[ERROR]   FrameTest.testSerializeChart:58 expected:<{[
  "chartData": [
    1,
    2,
    3,
    4,
    5,
    6,
    7
] ]
}> but was:<{[
  "chartData": [
    1,
    2,
    3,
    4,
    5,
    6,
    7
  ]]
}>
[ERROR]   FrameTest.testSerializeGoal:51 expected:<{[
  "icon": "i120",
] "goalData": {}
}> but was:<{[
  "icon": "i120",
  "goalData": {}]
}>
[ERROR]   FrameTest.testSerializeSimple:44 expected:<{[
  "icon": "i87",
] "text": "Hello world!"
}> but was:<{[
  "icon": "i87",
  "text": "Hello world!"]
}>
[ERROR]   GoalDataTest.testSerializeSimple:43 expected:<{[
  "start": 0,
  "current": 50,
  "end": 100,
] "unit": "%"
}> but was:<{[
  "start": 0,
  "current": 50,
  "end": 100,
  "unit": "%"]
}>
[ERROR]   UpdateActionTest.testSerialize:48 expected:<{[
  "id": "countdown.configure",
  "params": {
    "duration": 30
] }
}> but was:<{[
  "id": "countdown.configure",
  "params": {
    "duration": 30
  }]
}>
[ERROR]   WidgetTest.testSerialize:53 expected:<{[
  "package": "com.lametric.radio",
  "index": -1,
  "settings": {
    "_title": "Radio"
] }
}> but was:<{[
  "package": "com.lametric.radio",
  "index": -1,
  "settings": {
    "_title": "Radio"
  }]
}>
[ERROR]   WidgetUpdatesTest.testDeserialize:57 expected:<12[]▒> but was:<12[▒]▒>
[ERROR]   WidgetUpdatesTest.testSerialize:47 expected:<{[
  "frames": [
    {
      "icon": "i120",
      "text": "12°",
      "index": 0
    }
] ]
}> but was:<{[
  "frames": [
    {
      "icon": "i120",
      "text": "12▒",
      "index": 0
    }
  ]]
}>
[INFO]
[ERROR] Tests run: 53, Failures: 13, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.760 s
[INFO] Finished at: 2020-06-22T18:13:30+02:00
[INFO] Final Memory: 37M/649M
[INFO] ------------------------------------------------------------------------
@lolodomo lolodomo added bug An unexpected problem or unintended behavior of an add-on test labels Jun 22, 2020
@lolodomo
Copy link
Contributor Author

lolodomo commented Jun 22, 2020

This looks like the same problem as for the sleepiq binding, that is a different endline encoding.

@lolodomo
Copy link
Contributor Author

Confirmed. Same problem with an additional one. The degree character in the file widget-updates.json has a different encoding. I assume the encoding of the file widget-updates.json is not the expected one.

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jun 23, 2020
wborn pushed a commit that referenced this issue Jun 23, 2020
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this issue Jul 12, 2020
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant