File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import qualified Data.ByteString.Char8 as BS
10
10
import qualified Data.Vector as V
11
11
import System.Socket (SocketException (.. ))
12
12
import System.Mem.Weak (Weak , deRefWeak )
13
- import Control.Concurrent (throwTo )
13
+ import Control.Concurrent (throwTo , threadDelay )
7C6C
div>
14
14
import Control.Concurrent.Async
15
15
import Control.Exception
16
16
@@ -65,6 +65,8 @@ testBatchNextData interruptAction = withConnection $ \c -> do
65
65
testSimpleQuery :: (Connection -> IO () ) -> IO ()
66
66
testSimpleQuery interruptAction = withConnection $ \ c -> do
67
67
asyncVar <- async $ sendSimpleQuery c " SELECT pg_sleep(5)"
68
+ -- Make sure that query was sent.
69
+ threadDelay 1000000
68
70
interruptAction c
69
71
r <- wait asyncVar
70
72
assertUnexpected r
You can’t perform that action at this time.
0 commit comments