Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Sep 9, 2024
1 parent c9b8180 commit 0aca19e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions spec/datadog/ci/contrib/minitest/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1270,13 +1270,9 @@ def test_passed_second
end

it "bails out of retrying new tests and marks EFD as faulty" do
# 1 initial run of test_passed + 10 retries + 1 run of test_passed_second = 12 spans
# 1 initial run of a test + 10 retries + 1 run of another test = 12 spans
expect(test_spans).to have(12).items

test_spans_by_test_name = test_spans.group_by { |span| span.get_tag("test.name") }
expect(test_spans_by_test_name["test_passed"]).to have(1).item
expect(test_spans_by_test_name["test_passed_second"]).to have(11).items

# count how many spans were marked as retries
retries_count = test_spans.count { |span| span.get_tag("test.is_retry") == "true" }
expect(retries_count).to eq(10)
Expand Down

0 comments on commit 0aca19e

Please sign in to comment.