def validate_span(span_obj):
     result_span = test_helper.massage_result_span(span_obj)
     timestamps = test_helper.get_timestamps(result_span)
     get_span['trace_id'] = get_id(default_trace_id_generator(span_obj))
     assert get_span == result_span
     assert old_time <= timestamps['sr']
     assert timestamps['sr'] <= timestamps['ss']
 def validate_span(span_obj):
     result_span = test_helper.massage_result_span(span_obj)
     timestamps = test_helper.get_timestamps(result_span)
     get_span['trace_id'] = get_id(default_trace_id_generator(span_obj))
     assert get_span == result_span
     assert old_time <= timestamps['sr']
     assert timestamps['sr'] <= timestamps['ss']
 def validate_span(span_obj):
     result_span = test_helper.massage_result_span(span_obj)
     timestamps = test_helper.get_timestamps(result_span)
     get_span["trace_id"] = unsigned_hex_to_signed_int(default_trace_id_generator(span_obj))
     assert get_span == result_span
     assert old_time <= timestamps["sr"]
     assert timestamps["sr"] <= timestamps["ss"]
Esempio n. 4
0
 def validate_span(span_objs):
     assert len(span_objs) == 1
     span_obj = span_objs[0]
     result_span = test_helper.massage_result_span(span_obj)
     timestamps = test_helper.get_timestamps(result_span)
     get_span['trace_id'] = unsigned_hex_to_signed_int(
         default_trace_id_generator(span_obj), )
     # The request to this service had no incoming Zipkin headers, so it's
     # assumed to be the root span of a trace, which means it logs
     # timestamp and duration.
     assert result_span.pop('timestamp') > old_time
     assert result_span.pop('duration') > 0
     assert get_span == result_span
     assert old_time <= timestamps['sr']
     assert timestamps['sr'] <= timestamps['ss']