-
Notifications
You must be signed in to change notification settings - Fork 505
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
Code changes for the new Clippy version and running test on Windows #1704
Changes from all commits
0c25a13
930c3d5
03e990d
bdbbdb9
e97c6ae
597b7fd
d22f97f
f9b47f2
4bdbc33
32126b1
cb81591
9708e12
6ef5850
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![cfg(unix)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests use |
||
|
||
use integration_test_runner::images::Collector; | ||
use std::fs::File; | ||
use std::os::unix::fs::PermissionsExt; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ use futures_util::{ | |
future::{self, Either}, | ||
pin_mut, | ||
stream::{self, FusedStream}, | ||
Stream, StreamExt, | ||
StreamExt, | ||
}; | ||
use opentelemetry::{ | ||
global, | ||
|
@@ -290,7 +290,7 @@ impl<RT: Runtime> PeriodicReaderWorker<RT> { | |
true | ||
} | ||
|
||
async fn run(mut self, mut messages: impl Stream<Item = Message> + Unpin + FusedStream) { | ||
async fn run(mut self, mut messages: impl Unpin + FusedStream<Item = Message>) { | ||
while let Some(message) = messages.next().await { | ||
if !self.process_message(message).await { | ||
break; | ||
|
@@ -435,9 +435,11 @@ mod tests { | |
}) | ||
.expect("callback registration should succeed"); | ||
|
||
_ = meter_provider.force_flush(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to trigger the callback code deterministically. This lets us assert things on the receiver end with certainty instead of waiting for |
||
|
||
// Assert | ||
receiver | ||
.recv_timeout(interval * 2) | ||
.try_recv() | ||
.expect("message should be available in channel, indicating a collection occurred"); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to suppress the clippy warning for the struct not being constructed. Check this for more details: https://github.com/open-telemetry/opentelemetry-rust/actions/runs/8943870592/job/24569519425?pr=1704
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue is that this module
test_http_client
is always defined, while used only when the featurert-tokio
is enabled. Should we define this module only when thert-tokio
is enabled?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. Covered this in #1711