nevzheng opened a new issue, #13962: URL: https://github.com/apache/gravitino/issues/13962
### What would you like to be improved? Tests get every service they need (MySQL, PostgreSQL, Hive, Kafka, S3-compatible storage, Trino and others) by starting Testcontainers containers on a local Docker network. Where Docker is unavailable or the services are already provided, such as Kubernetes services or CI service containers, these tests cannot run. Tests also assume container details: most reach services by container IP, and the core database tests hard-code the `root/root` login. ### How should we improve? Add a small, extensible provider layer so a test asks for a service and gets it from the container or from the environment, without knowing which: - **Endpoint per service.** Tests connect through an endpoint type (host, port, login, URLs), such as `DatabaseEndpoint`. Our container classes implement it, and so does an external implementation. - **One selection rule.** `ContainerSuite` returns the external service when its settings are present (for example `GRAVITINO_TEST_MYSQL_URL`, `_USER`, `_PASSWORD`) and starts no container for it; otherwise it starts the container as today. The lane then needs no Docker for that service. - **Safe on shared servers.** Resources a run creates on an external service get a per-run name token, and the run removes only what it created. - **Adding a service** means adding its endpoint type, its external implementation and its settings; tests do not change. Steps: 1. Databases: MySQL and PostgreSQL for the core database tests, with a CI job that runs them against GitHub Actions service containers. 2. Reach services from the test JVM by host and mapped port instead of container IP, one module per PR. This is needed before any non-database service can be external. 3. One non-database service as a pilot, such as Hive Metastore or Kafka. Related: #13900, #13899. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
