mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
chore(tests): output hge stderr in api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9384 GitOrigin-RevId: 5d78b59e12bf870a3cba81829dcf4d3e0d2aebf9
This commit is contained in:
parent
0d347c1a32
commit
b87506e87c
@ -35,6 +35,7 @@ import Data.IORef
|
||||
import Data.Pool
|
||||
import Data.Text qualified as T
|
||||
import Data.Text.Encoding (decodeUtf8)
|
||||
import Data.Text.IO qualified as T
|
||||
import Data.Vector (fromList)
|
||||
import Harness.Exceptions
|
||||
import Harness.Http qualified as Http
|
||||
@ -328,8 +329,9 @@ instance LoggableMessage HgeStdErrLogMessage where
|
||||
hgeStdErrRelayThread :: Logger -> Handle -> IO (IO ())
|
||||
hgeStdErrRelayThread logger hgeOutput = do
|
||||
async <- Async.async $ forever $ do
|
||||
nextChunk <- BS.hGetLine hgeOutput
|
||||
runLogger logger $ HgeStdErrLogMessage (decodeUtf8 nextChunk)
|
||||
nextChunk <- decodeUtf8 <$> BS.hGetLine hgeOutput
|
||||
T.putStrLn nextChunk
|
||||
runLogger logger $ HgeStdErrLogMessage nextChunk
|
||||
return $ Async.cancel async
|
||||
|
||||
-- | A thread that reads from the engine's StdOut handle and makes one test-log
|
||||
|
Loading…
Reference in New Issue
Block a user