Module: Datadog::CI::Contrib::Minitest::Test::InstanceMethods

Defined in:
lib/datadog/ci/contrib/minitest/test.rb

Instance Method Summary collapse

Instance Method Details

#after_teardownObject



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/datadog/ci/contrib/minitest/test.rb', line 51

def after_teardown
  test_span = _dd_test_tracing_component.active_test
  return super unless test_span

  finish_with_result(test_span, result_code)

  # remove failures if failure can be ignored because of retries
  self.failures = [] if test_span.should_ignore_failures?

  super
end

#runObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/datadog/ci/contrib/minitest/test.rb', line 35

def run
  return super unless datadog_configuration[:enabled]

  return run_without_datadog_reentry if datadog_run_reentered?

  test_suite = start_datadog_test_suite_if_parallel
  if test_suite&.should_skip?
    return skip_datadog_suite(test_suite)
  end

  test_span = start_datadog_test
  return skip_datadog_test(test_span) if test_span&.should_skip?

  super
end