8000 Fixed test for fault simple query · postgres-haskell/postgres-wire@9b66435 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b66435

Browse files
Fixed test for fault simple query
1 parent 2a0b1f9 commit 9b66435

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Fault.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import qualified Data.ByteString.Char8 as BS
1010
import qualified Data.Vector as V
1111
import System.Socket (SocketException(..))
1212
import System.Mem.Weak (Weak, deRefWeak)
13-
import Control.Concurrent (throwTo)
13+
import Control.Concurrent (throwTo, threadDelay)
1414
import Control.Concurrent.Async
1515
import Control.Exception
1616

@@ -65,6 +65,8 @@ testBatchNextData interruptAction = withConnection $ \c -> do
6565
testSimpleQuery :: (Connection -> IO ()) -> IO ()
6666
testSimpleQuery interruptAction = withConnection $ \c -> do
6767
asyncVar <- async $ sendSimpleQuery c "SELECT pg_sleep(5)"
68+
-- Make sure that query was sent.
69+
threadDelay 1000000
6870
interruptAction c
6971
r <- wait asyncVar
7072
assertUnexpected r

0 commit comments

Comments
 (0)
0