Skip to content

test: cover successful scheduled job not rerun before interval#1708

Open
0rlych1kk4 wants to merge 2 commits into
Ericsson:masterfrom
0rlych1kk4:test/scheduled-repair-rescheduling-regression
Open

test: cover successful scheduled job not rerun before interval#1708
0rlych1kk4 wants to merge 2 commits into
Ericsson:masterfrom
0rlych1kk4:test/scheduled-repair-rescheduling-regression

Conversation

@0rlych1kk4

Copy link
Copy Markdown
Contributor

Adds regression coverage for ScheduleManagerImpl to verify that a successfully executed scheduled job is not executed again on an immediate subsequent scheduler run.

The job remains queued, but after successful execution it should be PARKED until its configured run interval has elapsed. The test also verifies that the repair lock is acquired only once.

Validation:
mvn -pl core.impl -am -Dtest=TestScheduleManager -Dsurefire.failIfNoSpecifiedTests=false test

@0rlych1kk4
0rlych1kk4 requested a review from a team as a code owner July 3, 2026 14:58
@codecov-commenter

codecov-commenter commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.10%. Comparing base (9f4bd4e) to head (273e1b2).
⚠️ Report is 492 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #1708       +/-   ##
=============================================
- Coverage     77.45%   58.10%   -19.35%     
- Complexity     1308     1643      +335     
=============================================
  Files           135      224       +89     
  Lines          5566     9571     +4005     
  Branches        579      910      +331     
=============================================
+ Hits           4311     5561     +1250     
- Misses         1062     3703     +2641     
- Partials        193      307      +114     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

Hi @tommystendahl and @VictorCavichioli , I checked the failing CI jobs.

The failures appear to be in standalone/binary integration suites, with Docker/container startup or cleanup errors such as a Cassandra container not running and ITSchedules cleanup hitting a null HostStatesImpl. The changed test is only in TestScheduleManager under core.impl, and the core.impl module appears to complete successfully before the integration failures.

Validated locally with:
mvn -pl core.impl -am -Dtest=TestScheduleManager -Dsurefire.failIfNoSpecifiedTests=false test

Please let me know if you would like me to rerun or investigate any specific failing check.

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

Hi @tommystendahl and @VictorCavichioli , just checking if this test-only PR is still useful for the scheduler coverage. The added case is intentionally narrow: it verifies that after a scheduled job runs successfully and remains in the queue, an immediate second scheduler run does not execute the same job again before its configured run interval. It also verifies the repair lock is acquired only once.

I validated the targeted test locally with:

mvn -pl core.impl -am -Dtest=TestScheduleManager -Dsurefire.failIfNoSpecifiedTests=false test

Happy to adjust the assertion or test placement if you prefer a different way to cover this behavior.

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.

3 participants