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

tracing: move tracing instrumentation tests into tokio tests #7007

Merged
merged 6 commits into from
Dec 4, 2024

Conversation

hds
Copy link
Contributor

@hds hds commented Dec 3, 2024

Motivation

In #6112, tests for the tracing instrumentation were introduced. They
had to live in their own test crate under tokio/tests because the
tracing-mock crate that the tests use had not yet been published to
crates.io.

Solution

Now tracing-mock has been published to crates.io and so the separate
test crate and separate job to run it are no longer necessary. The
tracing instrumentation tests can be placed in with the other
integration tests in the tokio crate.

The tests themselves have also been updated to match the changes in the
tracing-mock API since the version which was being used.

In #6112, tests for the tracing instrumentation were introduced. They
had to live in their own test crate under `tokio/tests` because the
`tracing-mock` crate that the tests use had not yet been published to
crates.io.

Now `tracing-mock` has been published to crates.io and so the separate
test crate and separate job to run it are no longer necessary. The
tracing instrumentation tests can be placed in with the other
integration tests in the `tokio` crate.

The tests themselves have also been updated to match the changes in the
`tracing-mock` API since the version which was being used.
@hds hds force-pushed the hds/tracing-mock-from-crates.io branch from b02c7f5 to 911c6fe Compare December 3, 2024 13:36
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-tracing Tracing support in Tokio labels Dec 3, 2024
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks.

hds added 5 commits December 3, 2024 15:03
I was just making sure that if these tests fail, CI will fail.
The value isn't stable, and never made sense in the first place (sleep
for 7 milliseconds and get a `duration.op` of 8?!?!).
@hds hds merged commit b5c227d into master Dec 4, 2024
82 checks passed
@hds hds deleted the hds/tracing-mock-from-crates.io branch December 4, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-tracing Tracing support in Tokio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants