@@ -287,11 +287,15 @@ testCopy TestEnv{..} = TestCase $ do
287287 copy_ conn "COPY copy_test FROM STDIN (FORMAT CSV)"
288288 mapM_ (putCopyData conn) abortRows
289289 putCopyError conn "aborted"
290− copy_ conn "COPY copy_test TO STDOUT (FORMAT CSV)"
291− rows <- loop []
292290 -- Hmm, does postgres always produce \n as an end-of-line here, or
293291 -- are there cases where it will use a \r\n as well?
292+ copy_ conn "COPY copy_test TO STDOUT (FORMAT CSV)"
293+ rows <- loop []
294294 sort rows @?= sort copyRows
295+ -- Now, let's just verify that the connection state is back to ready,
296+ -- so that we can issue more queries:
297+ [Only (x::Int)] <- query_ conn "SELECT 2 + 2"
298+ x @?= 4
295299 where
296300 copyRows = ["1,foo\n"
297301 ,"2,bar\n"]