Skip to content

Commit bac3582

Browse files
authored
Merge pull request #273 from rust-lang/cancelled-workflows-deterministic
Make check for cancelled workflows deterministic
2 parents 9bcfd27 + 71c36cb commit bac3582

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/tests/mocks/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,13 @@ impl GitHubState {
9292
}
9393

9494
pub fn check_cancelled_workflows(&self, repo: GithubRepoName, expected_run_ids: &[u64]) {
95-
assert_eq!(
96-
&self.get_repo(&repo).lock().cancelled_workflows,
97-
expected_run_ids
98-
);
95+
let mut workflows = self.get_repo(&repo).lock().cancelled_workflows.clone();
96+
workflows.sort();
97+
98+
let mut expected = expected_run_ids.to_vec();
99+
expected.sort();
100+
101+
assert_eq!(workflows, expected);
99102
}
100103
}
101104

0 commit comments

Comments
 (0)