Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Test SQLite projection writes, asynchronous handlers, and failure cleanup

Đang mở
#607 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, sqlite
Lĩnh vực
database, testing

Hướng nghiên cứu

Start with src/Sqlite/src/Eventuous.Sqlite/Projections/SqliteProjector.cs and inspect its public event-handling entry point and both handler overloads. Read the existing SQLite event-store tests to find the project’s temporary-database setup, then add focused projection tests for database state, asynchronous completion, failure, cancellation, and connection reuse. Done means the acceptance criteria pass and the focused SQLite projection tests, existing SQLite suite, and projector coverage run complete.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

SqliteProjector has no recorded line coverage in the October 5, 2026 .NET 10 coverage run. Existing SQLite event-store tests do not establish that registered projection handlers correctly build and execute commands or handle failures. You can view a test coverage report I generated here: index.html

Source: SqliteProjector.cs.

Proposed tests

  • Define a small read-model projector and handle an event using a synchronous command-building handler. Query a real temporary SQLite database and assert the resulting row values.
  • Repeat with an asynchronous handler whose command creation is controlled by a completion signal. Verify that handling waits for it and that no row is written before it is released.
  • Project multiple events and verify the resulting read-model state, including parameterized values and event-context data used by the projection.
  • Make a command-building handler fail and verify that the error reaches the caller without writing a row.
  • Execute an invalid SQL command and verify error propagation and that a subsequent valid projection succeeds.
  • Cancel handling while an asynchronous handler is waiting. Verify cancellation propagation and that the cancelled handler's command is not executed.

Acceptance criteria

  • Both handler overloads are exercised through the projector's public event-handling entry point.
  • Assertions inspect real database state, not only mocked command calls.
  • Asynchronous completion, handler failure, SQL failure, and cancellation have observable assertions.
  • Connections are released on successful and failed handling, and subsequent valid operations remain usable.
  • Tests use isolated temporary databases and clean up their resources.
  • Tests do not call task or disposal extensions directly and require no Docker containers.

Validation

Run the focused SQLite projection tests and the existing SQLite suite. Collect coverage for SqliteProjector; unrelated SQL Server and PostgreSQL suites are not required for this test-only change.

Ngôn ngữ chính
C#
Star
512
Fork
99
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Eventuous/eventuous

Tất cả issue của Eventuous/eventuous

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.