• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmrs / openmrs-core / 37518343506
66%
master: 65%

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 06 Oct 2026 07:31PM UTC
Jobs 1
Files 882
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Oct 2026 07:21PM UTC coverage: 66.431% (-0.03%) from 66.459%
37518343506

push

github

dkayiwa
TRUNK-6819: Start the JobRunr job server only once OpenMRS has started (#6654)

The background job server was started while its application context was
still being created, so jobs could run before the context was ready. On
jetty:run this logged "EntityManagerFactory is closed" for a job that ran
during the context refresh after modules start, against the closed session
factory of the context being replaced, and "Task class ... not found" for a
module's job that ran after the first, core-only refresh, before modules
were loaded.

The server is now started by a SmartLifecycle once its context has finished
refreshing and stopped before the context closes. The webapp defers that
start until SchedulerService.onStartup(), which runs once modules have
started; contexts refreshed after startup start their server right away.

The webapp never closes its application context, so Context.shutdown() now
calls SchedulerService.onShutdown() first, as it did before the move to
JobRunr, and JobRunrSchedulerService stops the job server there, before the
modules and the session factory are shut down.

On 2.9.x, JobRunr 6 does not return the server in its configuration
result, so the lifecycle takes it from JobRunr, and the scheduler service
is declared in applicationContext-service.xml, so its lifecycle is set
there rather than with @Autowired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NK4kFG8qyevx9Bk9jWoEgS
Claude-Session: https://claude.ai/code/session_01PdDdZrB8Q5eMgej5FmRx4R
Claude-Session: https://claude.ai/code/session_01LZ92BDLHrn6xACczVMtSiR

33 of 37 new or added lines in 5 files covered. (89.19%)

38 existing lines in 9 files now uncovered.

25960 of 39078 relevant lines covered (66.43%)

0.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
55.05
3.69% api/src/main/java/org/openmrs/api/context/Context.java
1
3.44
-0.01% web/src/main/java/org/openmrs/web/Listener.java

Coverage Regressions

Lines Coverage ∆ File
11
23.08
-42.31% api/src/main/java/org/openmrs/scheduler/jobrunr/JobRequestHandlerAdapter.java
10
55.41
-3.28% web/src/main/java/org/openmrs/web/filter/update/UpdateFilter.java
5
50.63
-3.16% api/src/main/java/org/openmrs/api/context/Daemon.java
4
0.0
-17.39% api/src/main/java/org/openmrs/scheduler/jobrunr/JobRunrTaskContext.java
3
92.47
-1.08% api/src/main/java/org/openmrs/validator/PatientProgramValidator.java
2
77.78
-22.22% api/src/main/java/org/openmrs/scheduler/jobrunr/JobRequestAdapter.java
1
87.23
-0.53% api/src/main/java/org/openmrs/api/context/UserContext.java
1
95.05
0.0% api/src/main/java/org/openmrs/util/ThreadSafeCircularFifoQueue.java
1
3.44
-0.01% web/src/main/java/org/openmrs/web/Listener.java
Jobs
ID Job ID Ran Files Coverage
1 37518343506.1 06 Oct 2026 07:31PM UTC 882
66.43
Source Files on build 37518343506
  • Tree
  • List 882
  • Changed 13
  • Source Changed 4
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37518343506
  • e200cbe3 on github
  • Prev Build on 2.9.x (#37314241460)
  • Next Build on 2.9.x (#37634681256)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc