openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[dynamodb] Fix test failure #5847

Closed ssalonen closed 5 years ago

ssalonen commented 5 years ago

Attempt to fix https://ci.openhab.org/job/openHAB1-Addons/lastCompletedBuild/org.openhab.persistence$org.openhab.persistence.dynamodb.test/testReport/org.openhab.persistence.dynamodb.internal/AbstractDynamoDBItemSerializationTest/testDecimalTypeWithNumberItem/

cc @kaikreuzer

Did not fail with all platforms (for example could reproduce locally).

org.openhab.persistence.dynamodb.internal.AbstractDynamoDBItemSerializationTest.testDecimalTypeWithNumberItem

Failing for the past 3 builds (Since Unstable#1698 )
Took 3 ms.

Error Message
Expected state 3.2 (3.2 but with some digits lost) did not match actual state 3.2000000000000001776356839400250464678

Stacktrace
java.lang.AssertionError: Expected state 3.2 (3.2 but with some digits lost) did not match actual state 3.2000000000000001776356839400250464678
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)
    at org.openhab.persistence.dynamodb.internal.AbstractDynamoDBItemSerializationTest.testStateGeneric(AbstractDynamoDBItemSerializationTest.java:73)
    at org.openhab.persistence.dynamodb.internal.AbstractDynamoDBItemSerializationTest.testDecimalTypeWithNumberItem(AbstractDynamoDBItemSerializationTest.java:186)

Signed-off-by: Sami Salonen ssalonen@gmail.com