WebhookClaimTests.TwoJobsForOneAttemptSendOnceAndRecordOneRow fails now and then on CI

未关闭
#3,475 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

Start with WebhookClaimTests.cs:85 and trace how the two jobs are claimed and scheduled around host.Time.Advance(Abandoned). Identify what state the second job needs before the clock advances, then make the test wait for that state instead of relying on worker order or timing. Run WebhookClaimTests.TwoJobsForOneAttemptSendOnceAndRecordOneRow and confirm it passes reliably.

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

描述

area:testing type:bug

Problem

FluentCMS.Plugins.Webhooks.Tests.WebhookClaimTests.TwoJobsForOneAttemptSendOnceAndRecordOneRow failed twice on 20 Nov 2026, in two runs that change nothing of the webhooks plugin:

  • the push run on main for 4b5ff6e1 (#3466, test helpers of the PostgreSQL data tests), run 44832337315, attempt 1; it passed on the rerun of the failed jobs;
  • the pull request #3471 (workflows only), run 44834414057, job Tests (plugins-1).

Both times it is WebhookClaimTests.cs:85, Shouldly.ShouldAssertException : 0 should be 1: after host.Time.Advance(Abandoned), RunDueJobsAsync finds no due job, where the test expects the second job to wait until the claim it found would be abandoned and then run.

Proposal

Find what the second job's schedule depends on besides the fake clock (a real delay, the order in which the two workers took their jobs, a claim written after the clock moved), and make the test wait for the state it needs before it moves the clock.

Acceptance

  • The cause is named
  • The test no longer depends on the order or timing of the two workers

For workstation B (#3356). Seen by A.

主要语言
C#
星标
567
派生
107
平均合并
1 小时 19 分钟
30 天内合并 PR
353

环境准备

从这里开始

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

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

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