Skip to content

ddtrace/tracer: fix race condition in abandonedspans_test.go#2195

Merged
darccio merged 1 commit into
mainfrom
dario.castane/AIT-7944/fix-flaky-tests
Aug 31, 2023
Merged

ddtrace/tracer: fix race condition in abandonedspans_test.go#2195
darccio merged 1 commit into
mainfrom
dario.castane/AIT-7944/fix-flaky-tests

Conversation

@darccio

@darccio darccio commented Aug 31, 2023

Copy link
Copy Markdown
Member

What does this PR do?

This PR fixes some flaky tests due to misplaced atomic variables' updates in internal counters that were used to avoid using time.Sleep in unit tests.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@darccio
darccio requested review from a team August 31, 2023 14:20
@pr-commenter

pr-commenter Bot commented Aug 31, 2023

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2023-08-31 14:34:49

Comparing candidate commit adf1079 in PR branch dario.castane/AIT-7944/fix-flaky-tests with baseline commit 5fda053 in branch main.

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

@darccio
darccio merged commit 52975ed into main Aug 31, 2023
@darccio
darccio deleted the dario.castane/AIT-7944/fix-flaky-tests branch August 31, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants