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

http-client/test-nonet: fix test after our hacks #1

Merged
merged 1 commit into from
Nov 12, 2019
Merged

Conversation

q3k
Copy link

@q3k q3k commented Nov 4, 2019

stack test now passes.

The following test did not compile before:

http-client        > build (lib + test)
http-client        > Preprocessing library for http-client-0.5.13..
http-client        > Building library for http-client-0.5.13..
http-client        > Preprocessing test suite 'spec-nonet' for http-client-0.5.13..
http-client        > Building test suite 'spec-nonet' for http-client-0.5.13..
http-client        > [7 of 8] Compiling Network.HTTP.ClientSpec
http-client        > 
http-client        > /work/http-client/http-client/test-nonet/Network/HTTP/ClientSpec.hs:242:17: error:
http-client        >     • Couldn't match expected type ‘IO Internal.Connection’
http-client        >                   with actual type ‘a0 -> IO Internal.Connection’
http-client        >     • Probable cause: ‘makeConnection’ is applied to too few arguments
http-client        >       In a stmt of a 'do' block:
http-client        >         conn <- makeConnection
http-client        >                   (return S.empty)
http-client        >                   (const checkStatus)
http-client        >                   (checkStatus >> writeIORef closedRef True)
http-client        >       In the second argument of ‘($)’, namely
http-client        >         ‘do closedRef <- newIORef False
http-client        >             okRef <- newIORef True
http-client        >             let checkStatus = ...
http-client        >             conn <- makeConnection
http-client        >                       (return S.empty)
http-client        >                       (const checkStatus)
http-client        >                       (checkStatus >> writeIORef closedRef True)
http-client        >             ....’
http-client        >       In a stmt of a 'do' block:
http-client        >         it "should not write to closed connection"
http-client        >           $ do closedRef <- newIORef False
http-client        >                okRef <- newIORef True
http-client        >                let checkStatus = ...
http-client        >                conn <- makeConnection
http-client        >                          (return S.empty)
http-client        >                          (const checkStatus)
http-client        >                          (checkStatus >> writeIORef closedRef True)
http-client        >                ....
http-client        >     |
http-client        > 242 |         conn <- makeConnection
http-client        >     |                 ^^^^^^^^^^^^^^...
http-client        > 

Because we change the signature of makeConnection in our fork.

@q3k q3k requested a review from arianvp November 4, 2019 13:11
@q3k q3k merged commit 4d344e8 into master Nov 12, 2019
akshaymankar pushed a commit that referenced this pull request Jan 13, 2020
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