Skip to content

Commit

Permalink
Merge pull request #268 from well-typed/edsko/issue-221
Browse files Browse the repository at this point in the history
Client-side timeouts
  • Loading branch information
edsko authored Jan 17, 2025
2 parents 1d35502 + 0ad6492 commit 17ae234
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 150 deletions.
7 changes: 1 addition & 6 deletions dev/interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,7 @@ $ docker stop $(docker ps -q)
>
> The only exception is `timeout_on_sleeping_server` for Java: it seems that the
> server does not conform to the gRPC specification here, and simply closes the
> connection without sending `DEADLINE_EXCEEDED` to the client. The Java
> _client_ does not notice this because (it seems) it imposes a _local_ timeout
> also, and doesn't even _connect_ to the server: the test even passes without
> the server running at all. (And indeed, the other clients don't seem precise
> enough here: the `grapesy` server was passing this test before it implemented
> timeouts _at all_.)
> connection without sending `DEADLINE_EXCEEDED` to the client.
It is also possible to only run one specific test case, for example:

Expand Down
8 changes: 2 additions & 6 deletions grapesy/interop/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ import Interop.Server (runInteropServer)

main :: IO ()
main = do
-- TODO: <https://github.com/well-typed/grapesy/issues/123>
--
-- Under some circumstances we can see a "Thread killed" exception when a
-- test fails. By setting this handler, we can at least confirm that this
-- exception is coming from an uncaught exception in a thread.
setUncaughtExceptionHandler $ \err ->
setUncaughtExceptionHandler $ \err -> do
hPutStrLn stderr $ "Uncaught exception: " ++ show err
hFlush stderr

-- Ensure we see server output when running inside docker
hSetBuffering stdout NoBuffering
Expand Down
Loading

0 comments on commit 17ae234

Please sign in to comment.