Skip to content

Commit 8c65359

Browse files
debug windows ci failure
1 parent df65f82 commit 8c65359

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

fixture-data/src/nextest_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub static EXPECTED_TEST_SUITES: LazyLock<IdOrdMap<TestSuiteFixture>> = LazyLock
4848
TestCaseFixtureStatus::IgnoredPass,
4949
),
5050
TestCaseFixture::new(
51-
"test_slow_timeout_flaky_mod_4",
51+
"test_flaky_slow_timeout_mod_4",
5252
TestCaseFixtureStatus::IgnoredFail
5353
),
5454
TestCaseFixture::new("test_stdin_closed", TestCaseFixtureStatus::Pass),

fixtures/nextest-tests/tests/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn test_slow_timeout_subprocess() {
321321

322322
#[test]
323323
#[ignore]
324-
fn test_slow_timeout_flaky_mod_4() {
324+
fn test_flaky_slow_timeout_mod_4() {
325325
let nextest_attempt = nextest_attempt();
326326
if nextest_attempt % 4 != 0 {
327327
panic!("Failed because attempt {} % 4 != 0", nextest_attempt)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: nextest-runner/src/reporter/displayer/progress.rs
3+
expression: s
4+
---
5+
 Cancelling [ 34:17:36] 10/20: 10 running, 0 passed, 1 timed out, 0 skipped
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: nextest-runner/src/reporter/displayer/progress.rs
3+
expression: s
4+
---
5+
 Running [ 34:17:36] 10/20: 10 running, 0 passed, 1 timed out, 0 skipped

nextest-runner/tests/integration/basic.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ fn test_timeout_with_retries() -> Result<()> {
157157
}
158158

159159
#[test]
160-
fn test_timeout_with_flaky_tests() -> Result<()> {
160+
fn test_timeout_with_flaky() -> Result<()> {
161161
test_init();
162162

163163
let pcx = ParseContext::new(&PACKAGE_GRAPH);
164164
let expr = Filterset::parse(
165-
"test(test_slow_timeout_flaky_mod_4)".to_owned(),
165+
"test(test_flaky_slow_timeout_mod_4)".to_owned(),
166166
&pcx,
167167
FiltersetKind::Test,
168168
)
@@ -203,15 +203,15 @@ fn test_timeout_with_flaky_tests() -> Result<()> {
203203

204204
let (_, instance_value) = instance_statuses
205205
.iter()
206-
.find(|&(&(_, name), _)| name == "test_slow_timeout_flaky_mod_4")
206+
.find(|&(&(_, name), _)| name == "test_flaky_slow_timeout_mod_4")
207207
.unwrap_or_else(|| panic!("test_flaky_mod_4 should be present"));
208208

209209
match &instance_value.status {
210210
InstanceStatus::Skipped(_) => panic!("test_flaky_mod_4 should have been run"),
211211
InstanceStatus::Finished(run_statuses) => {
212212
assert!(
213213
run_statuses.len() == 4,
214-
"test_slow_timeout_flaky_mod_4 should have been run 4 times, was run {} times",
214+
"test_flaky_slow_timeout_mod_4 should have been run 4 times, was run {} times",
215215
run_statuses.len()
216216
);
217217

@@ -971,8 +971,13 @@ fn test_override_timeout_result() -> Result<()> {
971971

972972
let (instance_statuses, run_stats) = execute_collect(runner);
973973

974-
assert_eq!(run_stats.passed_timed_out, 1, "only 1 test should pass");
975-
assert_eq!(run_stats.failed_timed_out, 2, "only 2 tests should fail");
974+
println!("{instance_statuses:?}");
975+
assert_eq!(run_stats.finished_count, 3, "4 tests should have finished");
976+
assert_eq!(
977+
run_stats.passed_timed_out, 1,
978+
"1 test should pass with timeout"
979+
);
980+
assert_eq!(run_stats.failed_timed_out, 2, "2 tests should fail");
976981

977982
for test_name in [
978983
"test_slow_timeout",
@@ -997,7 +1002,7 @@ fn test_override_timeout_result() -> Result<()> {
9971002
"{test_name} should have taken less than 5 seconds, actually took {:?}",
9981003
run_status.time_taken
9991004
);
1000-
if test_name == "test_slow_timeout" {
1005+
if matches!(test_name, "test_slow_timeout") {
10011006
(
10021007
ExecutionResult::Timeout {
10031008
result: SlowTimeoutResult::Pass,

0 commit comments

Comments
 (0)