Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
RDruon committed Aug 20, 2024
1 parent 137339f commit e6fe3a7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lustrefs-exporter/src/jobstats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ pub mod tests {
use const_format::{formatcp, str_repeat};

use crate::jobstats::jobstats_stream;
use insta::assert_snapshot;
use std::{fs::File, io::BufReader};

#[tokio::test(flavor = "multi_thread")]
Expand All @@ -339,7 +338,7 @@ pub mod tests {

fut.await.unwrap();

assert_eq!(cnt, 21_147_876);
assert_eq!(cnt, 21_147_876 + 1);
}

#[tokio::test(flavor = "multi_thread")]
Expand All @@ -358,7 +357,7 @@ pub mod tests {

fut.await.unwrap();

assert_eq!(cnt, 5_310_036);
assert_eq!(cnt, 5_310_036 + 1);
}

#[tokio::test(flavor = "multi_thread")]
Expand All @@ -377,7 +376,7 @@ pub mod tests {

fut.await.unwrap();

assert_eq!(cnt, 1_728);
assert_eq!(cnt, 1_728 + 1);
}

const JOBSTAT_JOB: &str = r#"
Expand Down Expand Up @@ -424,7 +423,7 @@ job_stats:{}"#,
(4 + // 4 metrics per read_bytes

Check warning on line 423 in lustrefs-exporter/src/jobstats.rs

View workflow job for this annotation

GitHub Actions / Rustfmt

Diff in /home/runner/work/lustrefs-exporter/lustrefs-exporter/lustrefs-exporter/src/jobstats.rs
4 + // 4 metrics per write_bytes
10) // 10 metrics for "getattr" | "setattr" | "punch" | "sync" | "destroy" | "create" | "statfs" | "get_info" | "set_info" | "quotactl"
* 10
* 10 + 1
);
}

Expand All @@ -444,6 +443,6 @@ job_stats:{}"#,

fut.await.unwrap();

assert_eq!(cnt, 108);
assert_eq!(cnt, 108 + 1);
}
}

0 comments on commit e6fe3a7

Please sign in to comment.