Skip to content

Commit

Permalink
Introduce Conservative test mode
Browse files Browse the repository at this point in the history
We still depend on a fix to `http2`; without it, depending on whether or not
the GC is able to detect an STM deadlock, the tests can hang. See
kazu-yamamoto/http2#104 for details.
  • Loading branch information
edsko committed Jan 11, 2024
1 parent d643f33 commit 6af52f3
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 79 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/haskell-ci.yml
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20231110
# version: 0.17.20240109
#
# REGENDATA ("0.17.20231110",["github","cabal.project.ci"])
# REGENDATA ("0.17.20240109",["github","cabal.project.ci"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -160,6 +160,11 @@ jobs:
echo "package grapesy" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
source-repository-package
type: git
location: http://github.com/edsko/http2
tag: 8bd2ac2df4d57697d4dc4a7535ee02784e842425
package grapesy
tests: True
flags: +build-demo +build-stress-test
Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Expand Up @@ -3,3 +3,8 @@ packages: .
package grapesy
tests: True
flags: +build-demo +build-stress-test

source-repository-package
type: git
location: http://github.com/edsko/http2
tag: 8bd2ac2df4d57697d4dc4a7535ee02784e842425
5 changes: 5 additions & 0 deletions cabal.project.ci
Expand Up @@ -4,3 +4,8 @@ package grapesy
tests: True
flags: +build-demo +build-stress-test
ghc-options: -Werror

source-repository-package
type: git
location: http://github.com/edsko/http2
tag: 8bd2ac2df4d57697d4dc4a7535ee02784e842425
6 changes: 5 additions & 1 deletion src/Network/GRPC/Util/HTTP2/Stream.hs
Expand Up @@ -28,6 +28,7 @@ import Network.HTTP2.Server qualified as Server

import Network.GRPC.Util.HTTP2 (fromHeaderTable)
import Text.Show.Pretty
import Network.GRPC.Internal.NestedException

{-------------------------------------------------------------------------------
Streams
Expand Down Expand Up @@ -170,7 +171,10 @@ clientOutputStream writeChunk' flush' = do

data StreamException = StreamException SomeException CallStack
deriving stock (Show)
deriving anyclass (Exception)
deriving Exception via ExceptionWrapper StreamException

instance HasNestedException StreamException where
getNestedException (StreamException e _) = e

-- | Client disconnected unexpectedly
data ClientDisconnected = ClientDisconnected SomeException
Expand Down

0 comments on commit 6af52f3

Please sign in to comment.