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

ConcurrentTest fails with 'This job has not completed yet' #4

Closed
lotharschulz opened this issue Jul 18, 2019 · 1 comment
Closed

ConcurrentTest fails with 'This job has not completed yet' #4

lotharschulz opened this issue Jul 18, 2019 · 1 comment

Comments

@lotharschulz
Copy link

Request5ConcurrentKtTest.kt fails for me with:

java.lang.IllegalStateException: This job has not completed yet

Maybe this gets fixed once

kotlin version used: 1.3.41

@svtk
Copy link
Collaborator

svtk commented Jul 18, 2019

You're supposed to have this error if you follow step #9 and call async with the explicit dispatcher in Request5ConcurrentKtTest.kt. Is it your case or it's different?
See "We can try calling launch with the context of Dispatchers.Default in the example above and make sure the test fails: we will get an exception saying that the job has not completed yet." in https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/09_Testing.
(I should emphasize that //TODO: uncomment this assertion should be done during the last step)

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

No branches or pull requests

2 participants