Skip to content

Commit

Permalink
Merge branch 'master' into business-glossary-pydantic-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Feb 2, 2024
2 parents ec9b41e + 63a23d7 commit 11a6424
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import static com.linkedin.metadata.Constants.GLOBAL_TAGS_ASPECT_NAME;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.linkedin.common.TagUrn;
import com.linkedin.common.urn.TagUrn;
import com.linkedin.metadata.aspect.patch.PatchOperationType;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
pytest_dep,
"pytest-asyncio>=0.16.0",
"pytest-cov>=2.8.1",
"pytest-docker>=1.0.1",
"pytest-docker>=1.1.0",
deepdiff_dep,
"requests-mock",
"freezegun",
Expand Down
20 changes: 12 additions & 8 deletions metadata-ingestion/tests/test_helpers/docker_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import os
import subprocess
from typing import Callable, Optional, Union
from typing import Callable, Iterator, List, Optional, Union

import pytest
import pytest_docker.plugin
Expand Down Expand Up @@ -37,9 +37,11 @@ def wait_for_port(
docker_services.wait_until_responsive(
timeout=timeout,
pause=pause,
check=checker
if checker
else lambda: is_responsive(container_name, container_port, hostname),
check=(
checker
if checker
else lambda: is_responsive(container_name, container_port, hostname)
),
)
logger.info(f"Container {container_name} is ready!")
finally:
Expand All @@ -62,14 +64,16 @@ def docker_compose_runner(
):
@contextlib.contextmanager
def run(
compose_file_path: Union[str, list], key: str, cleanup: bool = True
) -> pytest_docker.plugin.Services:
compose_file_path: Union[str, List[str]], key: str, cleanup: bool = True
) -> Iterator[pytest_docker.plugin.Services]:
with pytest_docker.plugin.get_docker_services(
docker_compose_command=docker_compose_command,
docker_compose_file=compose_file_path,
# We can remove the type ignore once this is merged:
# https://github.com/avast/pytest-docker/pull/108
docker_compose_file=compose_file_path, # type: ignore
docker_compose_project_name=f"{docker_compose_project_name}-{key}",
docker_setup=docker_setup,
docker_cleanup=docker_cleanup if cleanup else False,
docker_cleanup=docker_cleanup if cleanup else [],
) as docker_services:
yield docker_services

Expand Down

0 comments on commit 11a6424

Please sign in to comment.