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

fix eventually nanos conversion #340

Merged
merged 1 commit into from
May 23, 2018
Merged

fix eventually nanos conversion #340

merged 1 commit into from
May 23, 2018

Conversation

dtanner
Copy link
Contributor

@dtanner dtanner commented May 23, 2018

After upgrading from kotlintest 2->3, some of our tests failed because eventually wasn't waiting nearly long enough. Looks like as part of the migration to use Duration, there was some bad math in converting millis to nanos. There are 1_000_000 nanos in a millisecond, not 1_000 (I had to look this up - I would've thought it was a thousand too!).

Adjusting the test as I did below without modifying Eventually.kt shows the issue, and fails with an error like this:
java.lang.AssertionError: Test failed after 3 seconds; attempted 942 times

@sksamuel sksamuel merged commit d2d6591 into kotest:master May 23, 2018
@sksamuel
Copy link
Member

Great spot thanks!

@sksamuel
Copy link
Member

I've released 3.1.4 with this fix. Thanks again.

@dtanner
Copy link
Contributor Author

dtanner commented May 24, 2018

👍 - thanks for the quick release.

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