go-systemd icon indicating copy to clipboard operation
go-systemd copied to clipboard

daemon: Adds SdNotifyBarrier

Open rsms opened this issue 5 years ago • 3 comments

This adds daemon.SdNotifyBarrier including a unit test. It is modeled after systemd's sd_notify_barrier.

The barrier function is useful when a signalling process wants to wait for systemd to process previously-sent messages.

  • I certify that I recognize and agree to the Developer Certificate of Origin of this project.
  • Tested on go 1.15.2-linux-amd64 and 1.15.2-linux-386
  • go fmt has been applied to the source code as that seems to be the case with other source files in this project.

Thanks for a useful package!

rsms avatar Oct 02 '20 23:10 rsms

It appears an unrelated, unmodified test failed from timeout according to Travis:

...
--- FAIL: TestPropertiesSubscription (10.01s)
1721    subscription_test.go:188: Reached timeout
...

rsms avatar Oct 03 '20 00:10 rsms

@rsms thanks for the patch and the accompanying test! I've left a few comments in review, the only major one about using a context for timing out. The CI sometimes flakes a bit, in which case you can force-push to re-trigger it.

lucab avatar Oct 05 '20 08:10 lucab

@rsms can you please rebase on latest master? CI moved to github actions in the meanwhile.

lucab avatar Dec 17 '20 10:12 lucab