-
Notifications
You must be signed in to change notification settings - Fork 361
Ensure PropertiesChanged signal is sent when handling SIGUSR* #1505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add the missing EmitsChangedSignal annotations to the *Length dbus properties, which were given changed signals in dunst-project#1127 . Fixes incorrect introspection mentioned in dunst-project#832 .
Make SIGUSR* signal handlers send a PropertiesChanged signal after modifying the paused state. Fixes the remainder of dunst-project#832 .
Checks seem to have failed, I assume there's a problem in the CI? |
Yes, its unrelated to the test suite. |
code looks good. Line 111 in ee63a72
|
These tests ensure that PropertiesChanged signals are sent when the pause and unpause signals are handled. Signal handler functions are called directly instead of emitting real signals, as doing this might not be safe inside of a testing environment.
@bynect I've added two tests for the pause and unpause signals, I hope these will suffice. One thing I have noticed is that tests which subscribe to DBus signals seem to lock up when failing. This seems to be a result of the assert functions exiting the function immediately without ever getting to the cleanup code, which in turn leaks memory and never unsubscribes from the DBus signal. I haven't solved this issue in my new test though, as doing so likely means a rework in many of the existing tests as well. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1505 +/- ##
==========================================
+ Coverage 64.72% 65.02% +0.30%
==========================================
Files 51 51
Lines 9082 9129 +47
Branches 1068 1071 +3
==========================================
+ Hits 5878 5936 +58
+ Misses 3204 3193 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
two are fine 👍🏻
you mean they will deadlock? i don't know if it is worth it reworking the code for all those test functions, after all if we detect a failure nothing guarantees the state of the program is correct |
Yes, which may be troublesome if the intention is to report on all tests even if some of them fail. Glad to see everything is passing and working now though! |
This PR fixes #832 , ensuring any applications listening to the pause state properties will always receive proper updates.
The introspection XML is also modified to advertise the changed signals for the *Length properties, which was missing before, and mentioned in the same issue.