Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Expose WaitUntilReady constructors

Open
#46 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
testing

Research direction

Start by locating the WaitReady constructor and the module export list that currently keeps it private. Check how existing readiness checks are represented, then expose the constructor so callers can define custom database checks like the example. Confirm that the public API still builds and that a custom WaitUntilReady value can be constructed.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Haskell
Stars
77
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testcontainers/testcontainers-hs

All issues in testcontainers/testcontainers-hs

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.