Skip to content

Conversation

@p-datadog
Copy link
Member

What does this PR do?
Changes a method under test for a DI test that asserts on method execution duration to take more time.

Motivation:
Flaky test execution in CI where the previous version (method simply returning an integer) was reported as having zero execution time:

  1) Instrumentation integration log probe method probe when message template references special variables @duration substitutes the expected value
     Failure/Error: expect(value).to be > 0

       expected: > 0
            got:   0.0
     # ./spec/datadog/di/integration/instrumentation_spec.rb:535:in 'block (7 levels) in <top (required)>'
     # ./lib/datadog/di/probe_manager.rb:242:in 'Datadog::DI::ProbeManager#probe_executed_callback'
     # ./lib/datadog/di/instrumenter.rb:218:in 'block (2 levels) in hook_method'
     # ./spec/datadog/di/integration/instrumentation_spec.rb:538:in 'block (6 levels) in <top (required)>'
     # ./spec/spec_helper.rb:274:in 'block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:154:in 'block (2 levels) in <top (required)>'
     # ./spec/support/execute_in_fork.rb:32:in 'ForkableExample#run'

Change log entry
None

Additional Notes:

How to test the change?
Change is in test suite only

@p-datadog p-datadog requested a review from a team as a code owner November 19, 2025 19:21
@github-actions github-actions bot added the dev/testing Involves testing processes (e.g. RSpec) label Nov 19, 2025
@datadog-official
Copy link

datadog-official bot commented Nov 19, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 125.00%
Total Coverage: 98.52% (+0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6bdf919 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Nov 19, 2025

Benchmarks

Benchmark execution time: 2025-11-19 20:09:28

Comparing candidate commit da3bf7c in PR branch flaky-di-test with baseline commit 137add8 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 2 unstable metrics.

@p-datadog p-datadog merged commit 2c84fc0 into master Nov 20, 2025
419 of 422 checks passed
@p-datadog p-datadog deleted the flaky-di-test branch November 20, 2025 18:10
@github-actions github-actions bot added this to the 2.23.0 milestone Nov 20, 2025
p-datadog pushed a commit that referenced this pull request Nov 24, 2025
* master:
  [APMAPI-1774] Fix stable config segfault during error handling (#5073)
  Disable Ruby 3.5 preview1 testing
  [🤖] Update Latest Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/19603081078
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/19603099930
  [NO-TICKET] Workaround profiling benchmark flakiness on Ruby 2.6
  DI: make a test method longer to avoid flakiness (#5069)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/testing Involves testing processes (e.g. RSpec)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants