Skip to content

Testing docs, use Warp.testWithApplication to prevent race condition#1194

Merged
alpmestan merged 1 commit intohaskell-servant:masterfrom
rl-king:doc-test-warpserver
Aug 16, 2019
Merged

Testing docs, use Warp.testWithApplication to prevent race condition#1194
alpmestan merged 1 commit intohaskell-servant:masterfrom
rl-king:doc-test-warpserver

Conversation

@rl-king
Copy link
Contributor

@rl-king rl-king commented Jul 16, 2019

Ran into an issue today running tests based on these examples on Gitlab CI. The tests were either tried too soon or the port was unavailable. Warp.testWithApplication seems to take care of order and shutdown.

It should also be fine to use hspecs parallel since every test gets its own port. I left it out cause it seemed a bit unnecessary for this example.

The elasticsearch example is not updated and still uses bracket. It didn't seem entirely straightforward to implement due to the setting of the port with the action.

@alpmestan alpmestan merged commit 35cae91 into haskell-servant:master Aug 16, 2019
@alpmestan
Copy link
Contributor

Thanks!

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