Skip to content
New issue

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

test(ingest): make hive/trino test more reliable #6741

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
env_file:
- ./hadoop-hive.env
ports:
- "50070:50070"
- "50070"
datanode:
image: bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
env_file:
- ./setup/hadoop-hive.env
ports:
- "50070:50070"
- "50070"
datanode:
image: bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8
volumes:
Expand Down
11 changes: 5 additions & 6 deletions metadata-ingestion/tests/integration/trino/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: "3"

services:

testtrino:
image: trinodb/trino:369
container_name: "testtrino"
Expand All @@ -14,13 +14,13 @@ services:
depends_on:
- "trinodb_postgres"
- "hive-metastore"

trinodb_postgres:
image: postgres:alpine
container_name: "trinodb_postgres"
environment:
POSTGRES_PASSWORD: datahub
volumes:
volumes:
- ./setup/setup.sql:/docker-entrypoint-initdb.d/postgres_setup.sql
ports:
- "5432:5432"
Expand All @@ -33,7 +33,7 @@ services:
env_file:
- ./setup/hadoop-hive.env
ports:
- "50070:50070"
- "50070"
datanode:
image: bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8
volumes:
Expand All @@ -43,7 +43,7 @@ services:
environment:
SERVICE_PRECONDITION: "namenode:50070"
ports:
- "50075:50075"
- "50075"
hive-server:
image: bde2020/hive:2.3.2-postgresql-metastore
container_name: "testhiveserver2"
Expand All @@ -58,7 +58,6 @@ services:
- ./setup/hive_setup.sql:/hive_setup.sql
hive-metastore:
image: bde2020/hive:2.3.2-postgresql-metastore
container_name: "hive-metastore"
env_file:
- ./setup/hadoop-hive.env
command: /opt/hive/bin/hive --service metastore
Expand Down
4 changes: 2 additions & 2 deletions metadata-ingestion/tests/test_helpers/docker_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def docker_compose_runner(
):
@contextlib.contextmanager
def run(
compose_file_path: Union[str, list], key: str
compose_file_path: Union[str, list], key: str, cleanup: bool = True
) -> pytest_docker.plugin.Services:
with pytest_docker.plugin.get_docker_services(
docker_compose_command=docker_compose_command,
docker_compose_file=compose_file_path,
docker_compose_project_name=f"{docker_compose_project_name}-{key}",
docker_setup=docker_setup,
docker_cleanup=docker_cleanup,
docker_cleanup=docker_cleanup if cleanup else False,
) as docker_services:
yield docker_services

Expand Down