You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 3, 2025. It is now read-only.
After a version update, I saw lot of test started to fail,
I've tracked down the issue to a compatibility issue between awaitility and kluent,
in awaitility ( maybe also in other libraries.. I don't know ) await untilAsserted { X shouldBeEqualTo Y }
the untilAsserted function expect the lambda assertion to return a AssertionError error , it seemed to be the case in the past ( with shouldBe , now deprecated in favor of shouldBeEqualTo ) but now it's changed and those assertion are just exceptions in kluent ,
a ugly workaround for me was overriding all those operators and wrap the exception in AssertionError
ie :
infix fun <I : Iterable<*>> I.assertShouldHaveSize(expectedSize: Int): I {
return apply { try {
this shouldHaveSize expectedSize
}catch (cfe : ComparisonFailedException){
throw AssertionError(cfe)
}
}
}