Skip to content

Commit

Permalink
Fix broken unrelated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dgetu committed May 22, 2021
1 parent e1ca938 commit db3cee0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,20 @@ def test_translate_to_jaeger(self):
links=(link,),
kind=trace_api.SpanKind.CLIENT,
resource=Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
),
trace._Span(
name=span_names[1],
context=parent_span_context,
parent=None,
resource=Resource({}),
resource=Resource({}, ""),
),
trace._Span(
name=span_names[2],
context=other_context,
parent=None,
resource=Resource({}),
resource=Resource({}, ""),
instrumentation_info=InstrumentationInfo(
name="name", version="version"
),
Expand Down Expand Up @@ -399,7 +399,8 @@ def test_max_tag_value_length(self):
resource=Resource(
attributes={
"key_resource": "some_resource some_resource some_more_resource"
}
},
schema_url="",
),
context=trace_api.SpanContext(
trace_id=0x000000000000000000000000DEADBEEF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,20 @@ def test_translate_to_jaeger(self):
links=(link,),
kind=trace_api.SpanKind.CLIENT,
resource=Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
),
trace._Span(
name=span_names[1],
context=parent_span_context,
parent=None,
resource=Resource({}),
resource=Resource({}, ""),
),
trace._Span(
name=span_names[2],
context=other_context,
parent=None,
resource=Resource({}),
resource=Resource({}, ""),
instrumentation_info=InstrumentationInfo(
name="name", version="version"
),
Expand Down Expand Up @@ -536,7 +536,8 @@ def test_max_tag_value_length(self):
resource=Resource(
attributes={
"key_resource": "some_resource some_resource some_more_resource"
}
},
schema_url="",
),
context=trace_api.SpanContext(
trace_id=0x000000000000000000000000DEADBEEF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def get_data_for_max_tag_length_test(
is_remote=False,
trace_flags=TraceFlags(TraceFlags.SAMPLED),
),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
span.start(start_time=start_time)
span.set_attribute("string1", "v" * 500)
Expand Down Expand Up @@ -379,7 +379,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=other_context, attributes={"key_bool": True}
),
),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
span1.start(start_time=start_times[0])
span1.set_attribute("key_bool", False)
Expand All @@ -393,7 +393,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=parent_span_context,
parent=None,
resource=trace.Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
)
span2.start(start_time=start_times[1])
Expand All @@ -405,7 +405,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=other_context,
parent=None,
resource=trace.Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
)
span3.start(start_time=start_times[2])
Expand All @@ -416,7 +416,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
name="test-span-3",
context=other_context,
parent=None,
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
instrumentation_info=InstrumentationInfo(
name="name", version="version"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_encode_id_zero_padding(self):
trace_flags=TraceFlags(TraceFlags.SAMPLED),
),
parent=trace_api.SpanContext(trace_id, parent_id, is_remote=False),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
otel_span.start(start_time=start_time)
otel_span.end(end_time=end_time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_encode_id_zero_padding(self):
trace_flags=TraceFlags(TraceFlags.SAMPLED),
),
parent=trace_api.SpanContext(trace_id, parent_id, is_remote=False),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
otel_span.start(start_time=start_time)
otel_span.end(end_time=end_time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class TestZipkinExporter(unittest.TestCase):
def setUpClass(cls):
trace.set_tracer_provider(
TracerProvider(
resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME})
resource=Resource(
{SERVICE_NAME: TEST_SERVICE_NAME}, schema_url=""
)
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def get_data_for_max_tag_length_test(
is_remote=False,
trace_flags=TraceFlags(TraceFlags.SAMPLED),
),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
span.start(start_time=start_time)
span.set_attribute("string1", "v" * 500)
Expand Down Expand Up @@ -379,7 +379,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=other_context, attributes={"key_bool": True}
),
),
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
)
span1.start(start_time=start_times[0])
span1.set_attribute("key_bool", False)
Expand All @@ -393,7 +393,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=parent_span_context,
parent=None,
resource=trace.Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
)
span2.start(start_time=start_times[1])
Expand All @@ -405,7 +405,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
context=other_context,
parent=None,
resource=trace.Resource(
attributes={"key_resource": "some_resource"}
attributes={"key_resource": "some_resource"}, schema_url=""
),
)
span3.start(start_time=start_times[2])
Expand All @@ -416,7 +416,7 @@ def get_exhaustive_otel_span_list() -> List[trace._Span]:
name="test-span-3",
context=other_context,
parent=None,
resource=trace.Resource({}),
resource=trace.Resource({}, ""),
instrumentation_info=InstrumentationInfo(
name="name", version="version"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TestZipkinExporter(unittest.TestCase):
def setUpClass(cls):
trace.set_tracer_provider(
TracerProvider(
resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME})
resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME}, "")
)
)

Expand Down

0 comments on commit db3cee0

Please sign in to comment.