|
15 | 15 | class Test_AWS_API_Gateway_Inferred_Span_Creation:
|
16 | 16 | """Verify AWS API Gateway inferred spans are created when a web server receives specific headers."""
|
17 | 17 |
|
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 |
20 | 20 |
|
21 | 21 | def setup_api_gateway_inferred_span_creation(self):
|
22 | 22 | headers = {
|
@@ -47,8 +47,8 @@ class Test_AWS_API_Gateway_Inferred_Span_Creation_With_Distributed_Context:
|
47 | 47 | distributed context.
|
48 | 48 | """
|
49 | 49 |
|
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 |
52 | 52 |
|
53 | 53 | def setup_api_gateway_inferred_span_creation_with_distributed_context(self):
|
54 | 54 | headers = {
|
@@ -83,8 +83,8 @@ class Test_AWS_API_Gateway_Inferred_Span_Creation_With_Error:
|
83 | 83 | an error.
|
84 | 84 | """
|
85 | 85 |
|
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 |
88 | 88 |
|
89 | 89 | def setup_api_gateway_inferred_span_creation_error(self):
|
90 | 90 | headers = {
|
@@ -173,7 +173,7 @@ def assert_api_gateway_span(testCase, span, path, status_code, is_distributed=Fa
|
173 | 173 |
|
174 | 174 | if not interfaces.library.replay:
|
175 | 175 | assert (
|
176 |
| - span["start"] == testCase.start_time_ns |
| 176 | + int(span["start"]) == int(testCase.start_time_ns) |
177 | 177 | ), f"Inferred AWS API Gateway span startTime should equal expected '{testCase.start_time_ns!s}''"
|
178 | 178 |
|
179 | 179 | if is_distributed:
|
|
0 commit comments