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

Client-side timeouts #268

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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