forge
Explore
Log in

Don't you dare go Hollow

watcher: Mark tests as ignored

Browse files at this commit

8b4517a87b395ee20b170b147a9760b895e900a7Ivan MolodetskikhParent: c7a8c44
Until someone figures out how to fix the flakiness. See
https://github.com/YaLTeR/niri/issues/2226
src/utils/watcher.rsmodified+23 -0
@@ -309,7 +309,15 @@ mod tests {
309 }309 }
310 }310 }
311 311
312+ // All tests are currently ignored because they are flaky. Presumably, this is because the
313+ // watcher thread sleeps can align with test thread runs in such a way that the watcher wakes
314+ // up in the middle between operations and ends up reporting a change one more time than
315+ // expected, leading to test failures on the final unchanged check.
316+ //
317+ // https://github.com/YaLTeR/niri/issues/2226
318+
312 #[test]319 #[test]
320+ #[ignore]
313 fn change_file() -> Result {321 fn change_file() -> Result {
314 TestPath::Explicit("niri/config.kdl")322 TestPath::Explicit("niri/config.kdl")
315 .setup(|sh| sh.write_file("niri/config.kdl", "a"))323 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -323,6 +331,7 @@ mod tests {
323 }331 }
324 332
325 #[test]333 #[test]
334+ #[ignore]
326 fn overwrite_but_dont_change_file() -> Result {335 fn overwrite_but_dont_change_file() -> Result {
327 TestPath::Explicit("niri/config.kdl")336 TestPath::Explicit("niri/config.kdl")
328 .setup(|sh| sh.write_file("niri/config.kdl", "a"))337 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -336,6 +345,7 @@ mod tests {
336 }345 }
337 346
338 #[test]347 #[test]
348+ #[ignore]
339 fn touch_file() -> Result {349 fn touch_file() -> Result {
340 TestPath::Explicit("niri/config.kdl")350 TestPath::Explicit("niri/config.kdl")
341 .setup(|sh| sh.write_file("niri/config.kdl", "a"))351 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -349,6 +359,7 @@ mod tests {
349 }359 }
350 360
351 #[test]361 #[test]
362+ #[ignore]
352 fn create_file() -> Result {363 fn create_file() -> Result {
353 TestPath::Explicit("niri/config.kdl")364 TestPath::Explicit("niri/config.kdl")
354 .setup(|sh| sh.create_dir("niri"))365 .setup(|sh| sh.create_dir("niri"))
@@ -362,6 +373,7 @@ mod tests {
362 }373 }
363 374
364 #[test]375 #[test]
376+ #[ignore]
365 fn create_dir_and_file() -> Result {377 fn create_dir_and_file() -> Result {
366 TestPath::Explicit("niri/config.kdl")378 TestPath::Explicit("niri/config.kdl")
367 .without_setup()379 .without_setup()
@@ -374,6 +386,7 @@ mod tests {
374 }386 }
375 387
376 #[test]388 #[test]
389+ #[ignore]
377 fn change_linked_file() -> Result {390 fn change_linked_file() -> Result {
378 TestPath::Explicit("niri/config.kdl")391 TestPath::Explicit("niri/config.kdl")
379 .setup(|sh| {392 .setup(|sh| {
@@ -390,6 +403,7 @@ mod tests {
390 }403 }
391 404
392 #[test]405 #[test]
406+ #[ignore]
393 fn change_file_in_linked_dir() -> Result {407 fn change_file_in_linked_dir() -> Result {
394 TestPath::Explicit("niri/config.kdl")408 TestPath::Explicit("niri/config.kdl")
395 .setup(|sh| {409 .setup(|sh| {
@@ -406,6 +420,7 @@ mod tests {
406 }420 }
407 421
408 #[test]422 #[test]
423+ #[ignore]
409 fn remove_file() -> Result {424 fn remove_file() -> Result {
410 TestPath::Explicit("niri/config.kdl")425 TestPath::Explicit("niri/config.kdl")
411 .setup(|sh| sh.write_file("niri/config.kdl", "a"))426 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -419,6 +434,7 @@ mod tests {
419 }434 }
420 435
421 #[test]436 #[test]
437+ #[ignore]
422 fn remove_dir() -> Result {438 fn remove_dir() -> Result {
423 TestPath::Explicit("niri/config.kdl")439 TestPath::Explicit("niri/config.kdl")
424 .setup(|sh| sh.write_file("niri/config.kdl", "a"))440 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -432,6 +448,7 @@ mod tests {
432 }448 }
433 449
434 #[test]450 #[test]
451+ #[ignore]
435 fn recreate_file() -> Result {452 fn recreate_file() -> Result {
436 TestPath::Explicit("niri/config.kdl")453 TestPath::Explicit("niri/config.kdl")
437 .setup(|sh| sh.write_file("niri/config.kdl", "a"))454 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -446,6 +463,7 @@ mod tests {
446 }463 }
447 464
448 #[test]465 #[test]
466+ #[ignore]
449 fn recreate_dir() -> Result {467 fn recreate_dir() -> Result {
450 TestPath::Explicit("niri/config.kdl")468 TestPath::Explicit("niri/config.kdl")
451 .setup(|sh| {469 .setup(|sh| {
@@ -463,6 +481,7 @@ mod tests {
463 }481 }
464 482
465 #[test]483 #[test]
484+ #[ignore]
466 fn swap_dir() -> Result {485 fn swap_dir() -> Result {
467 TestPath::Explicit("niri/config.kdl")486 TestPath::Explicit("niri/config.kdl")
468 .setup(|sh| sh.write_file("niri/config.kdl", "a"))487 .setup(|sh| sh.write_file("niri/config.kdl", "a"))
@@ -478,6 +497,7 @@ mod tests {
478 }497 }
479 498
480 #[test]499 #[test]
500+ #[ignore]
481 fn swap_dir_link() -> Result {501 fn swap_dir_link() -> Result {
482 TestPath::Explicit("niri/config.kdl")502 TestPath::Explicit("niri/config.kdl")
483 .setup(|sh| {503 .setup(|sh| {
@@ -510,6 +530,7 @@ mod tests {
510 }530 }
511 531
512 #[test]532 #[test]
533+ #[ignore]
513 fn swap_just_link() -> Result {534 fn swap_just_link() -> Result {
514 TestPath::Explicit("niri/config.kdl")535 TestPath::Explicit("niri/config.kdl")
515 .setup_any(|sh| {536 .setup_any(|sh| {
@@ -534,6 +555,7 @@ mod tests {
534 }555 }
535 556
536 #[test]557 #[test]
558+ #[ignore]
537 fn swap_many_regular() -> Result {559 fn swap_many_regular() -> Result {
538 TestPath::Regular {560 TestPath::Regular {
539 user_path: "user-niri/config.kdl",561 user_path: "user-niri/config.kdl",
@@ -568,6 +590,7 @@ mod tests {
568 }590 }
569 591
570 #[test]592 #[test]
593+ #[ignore]
571 fn swap_many_links_regular_like_nix() -> Result {594 fn swap_many_links_regular_like_nix() -> Result {
572 TestPath::Regular {595 TestPath::Regular {
573 user_path: "user-niri/config.kdl",596 user_path: "user-niri/config.kdl",