Skip to content

test: add regression tests for scheduler service (#1557) - #1690

Open
Srv99x wants to merge 6 commits into
imDarshanGK:mainfrom
Srv99x:test/scheduler-regression-tests
Open

test: add regression tests for scheduler service (#1557)#1690
Srv99x wants to merge 6 commits into
imDarshanGK:mainfrom
Srv99x:test/scheduler-regression-tests

Conversation

@Srv99x

@Srv99x Srv99x commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Adds robust regression testing for the weekly digest scheduler service to ensure background tasks trigger correctly and handle early-exit conditions gracefully.

Related Issue

Fixes #1557

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Demo Video

Windows.PowerShell.2026-07-27.23-51-42.mp4

Test evidence

$ pytest tests/test_scheduler.py -v
============================= test session starts ==============================
collected 6 items

backend/tests/test_scheduler.py ......                                   [100%]

============================== 6 passed in 2.19s ===============================

@Srv99x
Srv99x requested a review from imDarshanGK as a code owner July 26, 2026 09:12

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Srv99x Add demo video showing the working features

@Srv99x

Srv99x commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@imDarshanGK Since this PR specifically adds backend regression tests
for the scheduler service, there is no frontend UI to demonstrate.

Here is the terminal screen recording showing all 6 tests in the
isolated pytest suite executing and passing successfully on Python 3.12:

Windows.PowerShell.2026-07-27.23-51-42.mp4

Test summary:
✅ test_send_weekly_digests_disabled
✅ test_send_weekly_digests_no_subscribers
✅ test_send_weekly_digests_success
✅ test_send_weekly_digests_failure_does_not_update_last_sent_at
✅ test_start_scheduler_adds_job
✅ test_start_scheduler_twice_prevents_duplicate_jobs

6 passed in 2.02s

@Srv99x

Srv99x commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Also, it looks like the GitHub Actions runner for the Python 3.12 backend tests hung and was cancelled after 15 minutes (the Python 3.11 tests passed perfectly in 1m). Could you please re-run that specific failed job when you have a moment to clear the red check? @imDarshanGK

@Srv99x

Srv99x commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@imDarshanGK Just a quick ping on this! I've attached the terminal execution video above as requested. All 11 CI checks are now passing and the branch is up to date with main. Let me know if you need any other changes before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add regression tests for scheduler service (v2)

2 participants