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

Support async tests #203

Open
solarmosaic-kflorence opened this issue Dec 14, 2020 · 2 comments
Open

Support async tests #203

solarmosaic-kflorence opened this issue Dec 14, 2020 · 2 comments

Comments

@solarmosaic-kflorence
Copy link
Contributor

The runConsumerTest method is currently synchronous, because all of our code is asynchronous this means we have to use Await.result here instead of (in our case) ScalaTest's AsyncWordSpec. It would be better if this method were asynchronous by nature, and both a synchronous and asynchronous API were supported. (e.g. runConsumerTestAsync).

@solarmosaic-kflorence
Copy link
Contributor Author

Likewise for setupProviderState it would be nice to support asynchronous setting up of state.

@solarmosaic-kflorence
Copy link
Contributor Author

solarmosaic-kflorence commented Dec 17, 2020

Actually, now that I understand how this works a little better, it seems like it would be best to just allow separating the standing up of the stub server from the shutting down of the stub server (for consumer tests). There should be different methods for starting and stopping it. That way it can be controlled either before and after each test or before and after all tests. This would allow for a more natural ScalaTest syntax (at least when using WordSpec).

Related to #190

jbwheatley pushed a commit that referenced this issue Feb 15, 2021
Fixes #190 / #203: allow control over when stub server starts and stops.
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

1 participant