-
Notifications
You must be signed in to change notification settings - Fork 641
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
Remove inconsistent exceptionClass default values #2831
Conversation
Why some `eventually` methods has it set to `Throwable` and some doesn't? I suggest to remove it. Or if we want to keep it, put it as defaualt value to `EventuallyConfig`'sa constructor instead of `null`.
Looks like a build failure. |
@sksamuel Tests are now fixed. 💪🏻 |
@@ -46,14 +46,14 @@ class EventuallyTest : WordSpec() { | |||
} | |||
"pass tests that completed within the time allowed" { | |||
val end = System.currentTimeMillis() + 150 | |||
eventually(1.seconds) { | |||
eventually(1.seconds, RuntimeException::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this test fail now if we didn't add the exception ?
Will it break existing users code in other words ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will. Other proposed solution might be to add Throwable
to configuration's default constructor. Then it shouldn't break existing code, so changes to tests might be reverted. Should I do it?
Yes, we can't break anything.
…On Wed, 23 Feb 2022, 02:31 Ing. Jan Kaláb, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
kotest-assertions/kotest-assertions-core/src/jvmTest/kotlin/com/sksamuel/kotest/assertions/timing/EventuallyTest.kt
<#2831 (comment)>:
> @@ -46,14 +46,14 @@ class EventuallyTest : WordSpec() {
}
"pass tests that completed within the time allowed" {
val end = System.currentTimeMillis() + 150
- eventually(1.seconds) {
+ eventually(1.seconds, RuntimeException::class) {
Yes, it will. Other proposed solution might be to add Throwable to
configuration's default constructor. Then it shouldn't break existing code,
so changes to tests might be reverted. Should I do it?
—
Reply to this email directly, view it on GitHub
<#2831 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGTV5DGA24UZWP6GQ2DU4SLOHANCNFSM5OQ6VLFA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@sksamuel Ok, now it should be as you want. 👍🏻 |
Why some
eventually
methods has it set toThrowable
and some doesn't? I suggest to remove it. Or if we want to keep it, put it as defaualt value toEventuallyConfig
'sa constructor instead ofnull
.