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

Remove inconsistent exceptionClass default values #2831

Merged
merged 4 commits into from
Feb 23, 2022

Conversation

Pitel
Copy link
Contributor

@Pitel Pitel commented Feb 16, 2022

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.

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`.
@sksamuel
Copy link
Member

Looks like a build failure.

@Pitel
Copy link
Contributor Author

Pitel commented Feb 22, 2022

@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) {
Copy link
Member

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 ?

Copy link
Contributor Author

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?

@sksamuel
Copy link
Member

sksamuel commented Feb 23, 2022 via email

@Pitel
Copy link
Contributor Author

Pitel commented Feb 23, 2022

@sksamuel Ok, now it should be as you want. 👍🏻

@sksamuel sksamuel merged commit 4eb3a52 into kotest:master Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants