Skip to content

Commit f9bff1f

Browse files
committed
fix time comparisons
1 parent b73c41d commit f9bff1f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/integrations/test_inferred_proxy.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
class Test_AWS_API_Gateway_Inferred_Span_Creation:
1616
"""Verify AWS API Gateway inferred spans are created when a web server receives specific headers."""
1717

18-
start_time = round(time.time() * 1e3)
19-
start_time_ns = start_time * 1e6
18+
start_time = round(time.time() * 1000)
19+
start_time_ns = start_time * 1000000
2020

2121
def setup_api_gateway_inferred_span_creation(self):
2222
headers = {
@@ -47,8 +47,8 @@ class Test_AWS_API_Gateway_Inferred_Span_Creation_With_Distributed_Context:
4747
distributed context.
4848
"""
4949

50-
start_time = round(time.time() * 1e3)
51-
start_time_ns = start_time * 1e6
50+
start_time = round(time.time() * 1000)
51+
start_time_ns = start_time * 1000000
5252

5353
def setup_api_gateway_inferred_span_creation_with_distributed_context(self):
5454
headers = {
@@ -83,8 +83,8 @@ class Test_AWS_API_Gateway_Inferred_Span_Creation_With_Error:
8383
an error.
8484
"""
8585

86-
start_time = round(time.time() * 1e3)
87-
start_time_ns = start_time * 1e6
86+
start_time = round(time.time() * 1000)
87+
start_time_ns = start_time * 1000000
8888

8989
def setup_api_gateway_inferred_span_creation_error(self):
9090
headers = {
@@ -173,7 +173,7 @@ def assert_api_gateway_span(testCase, span, path, status_code, is_distributed=Fa
173173

174174
if not interfaces.library.replay:
175175
assert (
176-
span["start"] == testCase.start_time_ns
176+
int(span["start"]) == int(testCase.start_time_ns)
177177
), f"Inferred AWS API Gateway span startTime should equal expected '{testCase.start_time_ns!s}''"
178178

179179
if is_distributed:

0 commit comments

Comments
 (0)