Move tests to the guard-owned SQLite database and default to no database
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reproducing the failures when ephemeral*() configurations have no database, then classify which tests require persistence and which only rely on a helper assumption. Review #2924 for the guard-owned SQLite factory and coordinate package order with the maintainer; migrate tests package by package, excluding packages/tracker-core covered by PR #2923. Done means the old database path helper is removed, startup coverage is listed, and a full run leaves no data_*.db files or files in an empty TMPDIR after #2907.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Parent EPIC: #2392
Goal
No test leaves a data_*.db file behind. Tests that need persistence use the guard-owned SQLite database of #2924, and the ephemeral*() test configurations no longer configure a database. After this issue, a full test run leaves a fresh temporary directory empty.
Background
Every ephemeral*() configuration of torrust-tracker-test-helpers sets a SQLite database at <temp dir>/data_<random>.db, and nothing removes the file. One full test run left 301 such files; about 256 come from these configurations (#2907, #2394 finding F2).
The maintainer decided that ephemeral() may default to no database: a tracker runs without persistence, and tests that need it opt in through a factory that returns a guard the test keeps. With no database in ephemeral(), about 100 tests failed in an experiment, so those are the tests to move.
PR #2923 (#2902) fixes the leak inside packages/tracker-core, so this issue skips that package.
Approach
- Classify the tests that fail without a database: the test needs persistence, or only a helper assumes it.
- Move the tests that need persistence to the guard-owned factory, one pull request per package.
- Then remove the database from the
ephemeral*()configurations and removeephemeral_sqlite_database(). - List the tests that still cover the SQLite start-up path, because about 180 tests stop exercising it.
Tasks
- Reproduce and classify; agree the package order with the maintainer.
- Migrate the tests, one pull request per package.
- Default to no database and remove the old path helper.
- Recheck: a full run leaves no
data_*.db, and an emptyTMPDIRonce #2907 is done.
Depends on #2924 (the guard-owned SQLite test database). The full specification is added to docs/issues/open/ by a spec-only pull request.
- Ngôn ngữ chính
- Rust
- Star
- 532
- Fork
- 56
- Merge trung bình
- 11 giờ 20 phút
- Pull request đã merge (30 ngày)
- 282
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của torrust/torrust-tracker
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
torrust/torrust-tracker#3080 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
torrust/torrust-tracker#3069 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
torrust/torrust-tracker#3058 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
torrust/torrust-tracker#2978 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
torrust/torrust-tracker#2332 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của torrust/torrust-tracker
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Start here: how to contributeĐang mởdifficulty: easy docs help wanted tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
-
bug help wanted ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
userFRM/egui-charts#4386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eliasstravik/herdr-projects#1605 · 1 bình luận ·