We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to add a custom check, a real connection to the database with a test query. Something like this:
mariaDBReady :: TestDBInfo -> WaitUntilReady mariaDBReady db = WaitReady $ \container -> do withFrozenCallStack $ do let (endpointHost, endpointPort) = containerAddress container db.dbPort ci = defaultConnectInfo { connectHost = unpack endpointHost , connectPort = fromIntegral endpointPort , connectUser = unpack db.dbUsername , connectPassword = unpack db.dbPassword , connectDatabase = unpack db.dbName } wait = do r <- try (connect ci >>= flip query_ "select 2 + 3") case r of Right [Only (i :: Int)] -> do pure () Left (ex :: IOException) -> do threadDelay 500000 wait liftIO wait
This is currently not possible since WaitReady is not public.
WaitReady
The text was updated successfully, but these errors were encountered:
Good idea, happy to take a PR!
Sorry, something went wrong.
No branches or pull requests
I'd like to add a custom check, a real connection to the database with a test query. Something like this:
This is currently not possible since
WaitReady
is not public.The text was updated successfully, but these errors were encountered: