Webhook recovery test counts recurring jobs that the shared host fires after its clock moves

Đang mở
#3,409 0 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 1 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
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
backend, testing

Hướng nghiên cứu

Start with WebhookRecoveryTests.AQueueWhoseWakeUpWasLostIsSentInOrderByTheQueueJobAndKeptByRetention and WebhookFixture.HostAsync in the FluentCMS.Plugins.Webhooks.Tests project. Run the failing test alone, then with the full project, and trace how the host clock advance and recurring job runner affect RunDueJobsAsync. Done means the test passes in a full project run on main.

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

Mô tả

area:testing plugin type:bug

Problem

WebhookRecoveryTests.AQueueWhoseWakeUpWasLostIsSentInOrderByTheQueueJobAndKeptByRetention fails when the whole FluentCMS.Plugins.Webhooks.Tests project runs. It fails on main as well (checked at 034616ae on Windows arm64, SQLite). It passes when run alone or with its class.

The test expects RunDueJobsAsync to run one job, the retention it enqueued, but it ran six. The other five were content.trash.purge, jobs.retention, idempotency.retention, activity.retention and webhooks.retention, all on the default queue. WebhookFixture.HostAsync moves the host's clock forward two days and pumps. The host's own job runner then fires the recurring jobs that became due, from its maintenance loop, after the pump has finished. They are still due when the test runs, so it counts them.

Proposal

Have HostAsync wait until the recurring jobs the clock move made due have fired and run, for example by firing them itself before it pumps. Or have the test count only the jobs it enqueued.

Acceptance

  • The test passes in a full run of the project, on main
Ngôn ngữ chính
C#
Star
567
Fork
107
Merge trung bình
1 giờ 19 phút
Pull request đã merge (30 ngày)
353

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 fluentcms/FluentCMS

Tất cả issue của fluentcms/FluentCMS

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.