Cleanup of tests #11

Merged
merged 3 commits into from Aug 20, 2011

Conversation

Projects
None yet
2 participants
Contributor

tomlokhorst commented Aug 15, 2011

I've cleaned up the test/httpTest.hs file a bit and removed most of the warnings.

The server is now started using forkIO instead of forkProces, because the process kept hanging on my machine if something went wrong and it wasn't properly killed.

Added a simple test case for Network.Browser to check if a vanilla request doesn't send any Cookie header (in preparation for future tests based around cookies).

Member

hsenag commented Aug 15, 2011

Does the separate process keep hanging even after my commits? I did try a bit to break it after those and couldn't.

forkIO does also have the advantage of working on Windows, but I'm also a bit suspicious of doing a network test inside a single process, so I'm a little torn on this.

Contributor

tomlokhorst commented Aug 15, 2011

Yes, I was testing using your commit.

If I run it nicely all the way through it works correctly, I think.
But I was doing some weird things like pressing Ctrl+C while running tests and running ghci inside of vim.

I guess there should also be a second set of tests that run against a real, full blown http server like apache, for more realistic tests.
But these httpd-shed based tests can be used to build "artificial" tests, like the cookie one in pull request 12.

@hsenag hsenag merged commit 7da4ac0 into haskell:master Aug 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment