Skip to content

Commit 7aec5ae

Browse files
committed
Address comments
* Remove requests/pyproject.toml * Improve naming of _WAIT_INTERVAL * Fix type hint * Improve comment
1 parent d428d08 commit 7aec5ae

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

contract-tests/images/applications/requests/pyproject.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

contract-tests/images/mock-collector/mock_collector_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
_logger: Logger = getLogger(__name__)
2525
_TIMEOUT_DELAY: timedelta = timedelta(seconds=20)
26-
_WAIT_INTERVAL: float = 0.1
26+
_WAIT_INTERVAL_SEC: float = 0.1
2727
T: TypeVar = TypeVar("T")
2828

2929

@@ -133,7 +133,7 @@ def _wait_for_content(get_export: Callable[[], List[T]], wait_condition: Callabl
133133
return current_exported
134134
exported = current_exported
135135

136-
sleep(_WAIT_INTERVAL)
136+
sleep(_WAIT_INTERVAL_SEC)
137137
# pylint: disable=broad-exception-caught
138138
except Exception:
139139
_logger.exception("Error while reading content")

contract-tests/set-up-contract-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ rm -rf dist/contract_tests*
1515
cd contract-tests/images/mock-collector
1616
docker build . -t aws-appsignals-mock-collector-python
1717

18-
1918
# Find and store aws_opentelemetry_distro whl file
2019
cd ../../../dist
2120
DISTRO=(aws_opentelemetry_distro-*-py3-none-any.whl)

contract-tests/tests/test/amazon/requests/requests_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_application_network_aliases(self) -> List[str]:
4040
def get_application_extra_environment_variables(self) -> Dict[str, str]:
4141
"""
4242
This does not appear to do anything, as it does not seem that OTEL supports peer service for Python. Keeping
43-
for consistency at this time.
43+
for consistency with Java contract tests at this time.
4444
"""
4545
return {"OTEL_INSTRUMENTATION_COMMON_PEER_SERVICE_MAPPING": "backend=backend:8080"}
4646

@@ -162,7 +162,7 @@ def _assert_metric_attributes(
162162
method: str,
163163
path: str,
164164
metric_name: str,
165-
expected_sum: float,
165+
expected_sum: int,
166166
) -> None:
167167
target_metrics: List[Metric] = []
168168
for resource_scope_metric in resource_scope_metrics:

0 commit comments

Comments
 (0)