Repository navigation
Conversation
Rough draft: let tests get MySQL, PostgreSQL and other services from Testcontainers or from the environment (Kubernetes services, CI service containers) through one provider chain and per-service endpoint types.
…ternal MySQL and PostgreSQL Proof of concept for the SPIP in design-docs/testing/containers/. Tests ask ContainerSuite.getService(ServiceSpec) for a service and get a ServiceEndpoint. ContainerSuite asks ServiceProviders in order and keeps the first answer: providers listed through ServiceLoader, then ExternalServiceProvider (gravitino.test.<service>.* properties), then ContainerServiceProvider (today's containers). MySQL and PostgreSQL are the first services: DatabaseEndpoint is implemented by DatabaseContainer and by ExternalDatabase. The core MySQL and PostgreSQL lanes pass GRAVITINO_TEST_<MYSQL|POSTGRESQL>_URL, _USER and _PASSWORD to the test JVM; with them set, the lane starts no container and needs no Docker. Database names on an external server carry a random per-JVM token, and a run drops only what it created. BaseIT, BackendTestExtension, AbstractEntityStorageTest and the partition statistics tests take the login from the endpoint instead of root/root. A new core-test-external-db CI job runs both lanes against GitHub Actions service containers and checks that no other container started.
Code Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Nevin · project thread
CI only, not for review.
build.ymlruns only on PRs intomainorbranch-*, so the stacked POC (#16) gets no build. This PR targetsbranch-13962-base(= the apache#13899 head) to runcore-testand the newcore-test-external-dbjobs on the POC commit. Close it once CI has run.Generated by Claude Code