Class: Datadog::CI::TestSession

Inherits:
ConcurrentSpan show all
Defined in:
lib/datadog/ci/test_session.rb

Overview

Represents the whole test session process. Documentation on test sessions is here: docs.datadoghq.com/continuous_integration/explorer/?tab=testruns#sessions This object can be shared between multiple threads.

Instance Attribute Summary

Attributes inherited from Span

#tracer_span

Instance Method Summary collapse

Methods inherited from ConcurrentSpan

#get_tag, #initialize, #set_metric, #set_tag, #set_tags, #synchronize

Methods inherited from Span

#failed!, #get_tag, #id, #initialize, #name, #passed!, #service, #set_default_tags, #set_environment_runtime_tags, #set_metric, #set_tag, #set_tags, #skipped!, #span_type, #to_s

Constructor Details

This class inherits a constructor from Datadog::CI::ConcurrentSpan

Instance Method Details

#finishvoid

This method returns an undefined value.

Finishes the current test session.



17
18
19
20
21
# File 'lib/datadog/ci/test_session.rb', line 17

def finish
  super

  CI.deactivate_test_session
end

#inheritable_tagsObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/datadog/ci/test_session.rb', line 23

def inheritable_tags
  return @inheritable_tags if defined?(@inheritable_tags)

  # this method is not synchronized because it does not iterate over the tags collection, but rather
  # uses synchronized method to get each tag value
  res = {}
  Ext::Test::INHERITABLE_TAGS.each do |tag|
    res[tag] = get_tag(tag)
  end
  @inheritable_tags = res.freeze
end