Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracer: TestAgentIntegration: Clean up state for -count=2 #2261

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Oct 11, 2023

What does this PR do?

This test currently fails when run more than once, such as with:

go test ./ddtrace/tracer -run=TestAgentIntegration -count=2

To fix it, clear the integration state after each test. Add a test that expects the default state of "no integrations" both at the start and at the end of the test function.

Additionally: these tests were starting an HTTP test server that appears to be unused. Remove that to simplify the test.

Motivation

I'm trying to run the tests with -count=10 to check for race bugs, but it currently does not work.

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!

This test currently fails when run more than once, such as with:

go test ./ddtrace/tracer -run=TestAgentIntegration -count=2

To fix it, clear the integration state after each test. Add a test
that expects the default state of "no integrations" both at the start
and at the end of the test function.

Additionally: these tests were starting an HTTP test server that
appears to be unused. Remove that to simplify the test.
@evanj evanj requested a review from a team October 11, 2023 20:17
@pr-commenter
Copy link

pr-commenter bot commented Oct 11, 2023

Benchmarks

Benchmark execution time: 2023-10-16 08:05:47

Comparing candidate commit fb47bb6 in PR branch evan.jones/testagentintegration-clear-state with baseline commit 26fb2f4 in branch main.

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

@evanj evanj mentioned this pull request Oct 12, 2023
5 tasks
Copy link
Contributor

@ajgajg1134 ajgajg1134 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!!

@ajgajg1134 ajgajg1134 changed the title tracer TestAgentIntegration: Clean up state for -count=2 tracer: TestAgentIntegration: Clean up state for -count=2 Oct 16, 2023
@ajgajg1134 ajgajg1134 merged commit 0428ded into main Oct 16, 2023
53 checks passed
@ajgajg1134 ajgajg1134 deleted the evan.jones/testagentintegration-clear-state branch October 16, 2023 08:39
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.

None yet

2 participants