josueBarretogit / manga-tui

Terminal-based manga reader and downloader with image support
https://crates.io/crates/manga-tui
MIT License
489 stars 13 forks source link

Non-deterministic/flaky test `view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch` #62

Open youwen5 opened 2 weeks ago

youwen5 commented 2 weeks ago

The test view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch is flaky and occasionally fails when building in nixpkgs. This was not resolved by #56 and #57.

manga-tui> failures:
manga-tui>
manga-tui> ---- view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch stdout ----
manga-tui> thread 'view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch' panicked at src/backend/error_log.rs:44:64:
manga-tui> called `Result::unwrap()` on an `Err` value: Os { code: 17, kind: AlreadyExists, message: "File exists" }
manga-tui> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
manga-tui> thread 'view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch' panicked at src/view/pages/manga.rs:1872:14:
manga-tui> called `Result::unwrap()` on an `Err` value: Elapsed(())
manga-tui>
manga-tui>
manga-tui> failures:
manga-tui>     view::pages::manga::test::it_sends_event_chapter_bookmarked_failed_to_fetch

This failure seems hard to reproduce, but it occurs (especially on lower spec machines such as low resource build servers). See https://github.com/NixOS/nixpkgs/pull/353060#issuecomment-2458128825.

josueBarretogit commented 2 weeks ago

I wonder if this only happens on this test can you check by running cargo test --no-fail-fast? to know all the the failing tests

youwen5 commented 2 weeks ago

I believe is the only test that fails, I'm able to get it to build by deleting the test from the code.