Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Test SQLite projection writes, asynchronous handlers, and failure cleanup

未关闭
#607 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 7 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp, sqlite
领域
database, testing

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
512
派生
99
平均合并
5 天 6 小时
30 天内合并 PR
5

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Eventuous/eventuous 的其他 Issue

查看 Eventuous/eventuous 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。