private static ConnectionConfig createRootConnectionConfig(final ConnectionConfig connectionConfig) {
        final DbUrl dbUrl = DbUrl.parse(connectionConfig.getUrl());

        // Allow the db conn details to be overridden with env vars, e.g. when we want to run tests
        // from within a container, so we need a different host to localhost
        final String effectiveHost = getValueOrOverride(
                "STROOM_JDBC_DRIVER_HOST",
                "JDBC hostname",
                dbUrl::getHost,
                Function.identity());
        final int effectivePort = getValueOrOverride(
                "STROOM_JDBC_DRIVER_PORT",
                "JDBC port",
                dbUrl::getPort,
                Integer::parseInt);

        final String url = DbUrl
                .builder()
                .scheme(dbUrl.getScheme())
                .host(effectiveHost)
                .port(effectivePort)
                .query(dbUrl.getQuery())
                .build()
                .toString();
        return connectionConfig
                .copy()
                .url(url)
                .user("root")
                .password("my-secret-pw")
                .build();
    }
@param dbConfig         The config to use
@param name             The name of the datasource, i.e. the module name
@param unique           True if we want our own dedicated connection pool
@param isSharedDatabase True if we want to re-use the DB between tests. We normally do
                        to save on the cost of running migrations, but not for
                        migration tests as for those we want a blank db.
stroom-test-common/src/main/java/stroom/test/common/util/db/DbTestUtil.java