testValidAfterError :: IO ()
testValidAfterError = withConnection $ \c -> do
    let a = "5"
        rightQuery   = makeQuery1 a
        invalidQuery = Query "SELECT $1" []  Text Text NeverCache
    sendBatchAndSync c [invalidQuery]
    checkInvalidResult c 1
    waitReadyForQuery c

    sendBatchAndSync c [rightQuery]
    r <- readNextData c
    waitReadyForQuery c
    a @=? fromMessage r

-- | Describes usual statement.
testValidAfterError :: IO ()
testValidAfterError = withConnection $ \c -> do
    let a = "5"
        rightQuery   = makeQuery1 a
        invalidQuery = Query "SELECT $1" []  Text Text NeverCache
    sendBatchAndSync c [invalidQuery]
    checkInvalidResult c 1
    waitReadyForQuery c

    sendBatchAndSync c [rightQuery]
    r <- readNextData c
    waitReadyForQuery c
    a @=? fromMessage r

-- | Describes usual statement.
testValidAfterError = withConnection $ \c -> do
    let a = "5"
        rightQuery   = makeQuery1 a
        invalidQuery = Query "SELECT $1" []  Text Text NeverCache
    sendBatchAndSync c [invalidQuery]
    checkInvalidResult c 1
    waitReadyForQuery c

    sendBatchAndSync c [rightQuery]
    r <- readNextData c
    waitReadyForQuery c
    a @=? fromMessage r

-- | Describes usual statement.