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

Disable flaky test_poa_multiple_producers test #2353

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/services/src/async_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ mod tests {
// Then
while broadcast_receiver.recv().await.is_ok() {}
assert!(instant.elapsed() >= Duration::from_secs(10));
// Wait for the metrics to be updated.
tokio::time::sleep(Duration::from_secs(1)).await;
let duration = Duration::from_nanos(heavy_task_processor.metric.busy.get());
assert_eq!(duration.as_secs(), 10);
let duration = Duration::from_nanos(heavy_task_processor.metric.idle.get());
Expand Down Expand Up @@ -302,6 +304,8 @@ mod tests {
// Then
while broadcast_receiver.recv().await.is_ok() {}
assert!(instant.elapsed() <= Duration::from_secs(2));
// Wait for the metrics to be updated.
tokio::time::sleep(Duration::from_secs(1)).await;
let duration = Duration::from_nanos(heavy_task_processor.metric.busy.get());
assert_eq!(duration.as_secs(), 10);
let duration = Duration::from_nanos(heavy_task_processor.metric.idle.get());
Expand Down Expand Up @@ -333,8 +337,9 @@ mod tests {

// Then
while broadcast_receiver.recv().await.is_ok() {}
tokio::task::yield_now().await;
assert!(instant.elapsed() <= Duration::from_secs(2));
// Wait for the metrics to be updated.
tokio::time::sleep(Duration::from_secs(1)).await;
let duration = Duration::from_nanos(heavy_task_processor.metric.busy.get());
assert_eq!(duration.as_secs(), 0);
let duration = Duration::from_nanos(heavy_task_processor.metric.idle.get());
Expand Down
4 changes: 4 additions & 0 deletions crates/services/src/sync_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ mod tests {
// Then
while broadcast_receiver.recv().await.is_ok() {}
assert!(instant.elapsed() >= Duration::from_secs(10));
// Wait for the metrics to be updated.
tokio::time::sleep(Duration::from_secs(1)).await;
Copy link
Member

@rymnc rymnc Oct 14, 2024

Choose a reason for hiding this comment

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

is this change intended?

let duration = Duration::from_nanos(heavy_task_processor.metric.busy.get());
assert_eq!(duration.as_secs(), 10);
}
Expand Down Expand Up @@ -275,6 +277,8 @@ mod tests {
// Then
while broadcast_receiver.recv().await.is_ok() {}
assert!(instant.elapsed() <= Duration::from_secs(2));
// Wait for the metrics to be updated.
tokio::time::sleep(Duration::from_secs(1)).await;
let duration = Duration::from_nanos(heavy_task_processor.metric.busy.get());
assert_eq!(duration.as_secs(), 10);
}
Expand Down
1 change: 1 addition & 0 deletions tests/tests/poa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ mod p2p {
// Then starts second_producer that uses the first one as a reserved peer.
// second_producer should not produce blocks while the first one is producing
// after the first_producer stops, second_producer should start producing blocks
#[ignore = "seems to be flaky, issue: https://github.com/FuelLabs/fuel-core/issues/2351"]
#[tokio::test(flavor = "multi_thread")]
async fn test_poa_multiple_producers() {
const SYNC_TIMEOUT: u64 = 30;
Expand Down
Loading