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

cybertec-postgresql / pg_timetable / 32852812155
89%

Build:
DEFAULT BRANCH: master
Ran 25 Aug 2026 01:25PM UTC
Jobs 2
Files 31
Run time 1min
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

25 Aug 2026 01:21PM UTC coverage: 88.735% (-1.0%) from 89.734%
32852812155

push

github

web-flow
[!] add Windows service support (#825)

* Feat: Windows service support

- Add switch options --service  to register/unregister/start/stop windows service
- Add instructions in installation.md for using these
- Add workflow test to confirm windows still builds on any change

* prevent dropped stop and data race on Windows service shutdown

The Windows service handler runs on a goroutine started from `init()`,
before `main()` assigns the context cancel function. A stop request
arriving in that startup window was silently dropped (service reported
stopped while the scheduler kept running), and `cancelFn` was
read/written across goroutines without synchronization (data race
under -race).

Make `cancelFn` an `atomic.Pointer[context.CancelFunc]` and add
a `sync.Once`-closed cancelReady channel. On stop, `cancelApplication()`
waits for readiness (bounded by `serviceStopTimeout`) while emitting
`StopPending` heartbeats, then cancels once the target is available.
It also re-checks `getCancelFn()` each iteration so an already-set
cancel fires immediately.

Add `TestCancelApplicationWaitsForReadiness` plus cross-platform
cancel-state test helpers; run service tests with a bounded timeout.

* make linter happy

* move windows-specific parts out of common `main_test.go`

* add notify package to Windows tests

* increase service test coverage

* fix bug when a service is installed but not running

* add start/restart/stop workflow to tests

* Removed `install` from the `TestHandleServiceCommandDispatch`

* add `TestServiceRealStartStop` and fix `winServiceRunner.Execute`

* Make the service process terminate itself once the SCM stops it

* Add `TestConfigServiceSkipsDaemonRequirements`

---------

Co-authored-by: Pavlo Golub <pavlo.golub@gmail.com>

239 of 300 new or added lines in 6 files covered. (79.67%)

2505 of 2823 relevant lines covered (88.74%)

1.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
58
77.25
service_windows.go
3
56.6
4.92% main.go
Jobs
ID Job ID Ran Files Coverage
1 windows - 32852812155.1 25 Aug 2026 01:25PM UTC 3
66.31
GitHub Action Run
2 linux - 32852812155.2 25 Aug 2026 01:25PM UTC 29
89.81
GitHub Action Run
Source Files on build 32852812155
  • Tree
  • List 31
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32852812155
  • 4529803e on github
  • Prev Build on master (#32834036429)
  • Next Build on master (#32860261718)
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