Conversation
057a8b2 to
21aa1af
Compare
Codecov Report
@@ Coverage Diff @@
## master #217 +/- ##
==========================================
- Coverage 100% 99.78% -0.22%
==========================================
Files 74 74
Lines 8787 8815 +28
Branches 1421 1422 +1
==========================================
+ Hits 8787 8796 +9
- Misses 0 16 +16
- Partials 0 3 +3
Continue to review full report at Codecov.
|
9f8c36e to
1fe751a
Compare
This honors sleekxmpp's asynchronous nature by hooking into the "session_start" event callback. While being at it, some other things have been addressed. - Also hook into the "failed_auth" event callback in order to report any authentication failures back to the user. - Adjust sleekxmpp's logger to use the logging handlers and log level of apprise. That way, "-vvvvv" will yield loads of useful information for debugging. - Disable presence signalling and roster inquiry. Rationale: I believe both XMPP features resonate more with human users than bots. Omitting them tremendously speeds up processing. - xmpp.connect(): Use the "use_ssl=True" argument when the effective TCP port equals NotifyXMPP.default_secure_port. - xmpp.connect(): Use the "reattempt=False" argument to mitigate nasty delay before even connecting to XMPP server. Resolve caronc#213.
1fe751a to
3c89b0e
Compare
|
Dear Chris, I am failing on making the tests work again on CI. However, I can confirm they work perfectly on my workbench, both on Python 2.7 and 3.8 and both with or without having the You seem to know quite a bunch about the Maybe you will be more lucky than me? With kind regards, |
|
Can't we just |
|
Here is a new patch that brings test coverage up to 92% in the module you refactored (up from 74%): I still need to figure out how to get sleekxmpp to legitimately call:
I successfully mocked i had a look at the links you sent, but they don't really help because the tests you shared don't actually test that things are working correctly through |
|
Dear Chris, I don't want to distract your path to successful test coverage by hacking your way through the I just wanted to outline that there might be ways to test the Saying this, I've just discovered that the Cheers, |
This is definitely a brilliant idea; i spent an hr or too and can't make that tutorial work. 🙁 It doesn't seem to listen on the set port; it also appears to block indefinitely. If you want you an give it a try. I'm about to just give up and mock the functions so the code is at least tested (no typos/exceptions). It's not the best solution but it will achieve the 100% coverage i yearn for (🙂) and more (better) testing can always be added later to improve it. |
Been there, seen that. Please make sure you are using "127.0.0.1" to listen on. Otherwise, it might decide to listen on "::1", thus only being available via IPv6. |
After re-reading the documentation, I discovered this isn't actually a XMPP server component, it is a client component:
|
|
Hi Chris, I've tried to get Prosŏdy through Docker into the mix by a554505. There are some alternatives re. Docker images out there [1,2,3]. However, You can inspect the logs from Docker using
I believe this will be the pragmatic decision. Go ahead and good luck! With kind regards, [1] https://hub.docker.com/r/prosody/prosody |
|
Dear Chris, appreciate it. Thank you very much for picking up my work. Please go ahead and merge #220. With kind regards, |
Dear Chris,
coming from #213, we have been able to make some progress and we are happy with the outcome.
Cheers,
Andreas.
About
This honors sleekxmpp's asynchronous nature by hooking into the
"session_start" event callback. While being at it, some other
things have been addressed.
Also hook into the "failed_auth" event callback in order
to report any authentication failures back to the user.
Adjust sleekxmpp's logger to use the logging handlers
and log level of apprise. That way, "-vvvvv" will yield
loads of useful information for debugging.
Disable presence signalling and roster inquiry.
Rationale: I believe both XMPP features resonate more
with human users than bots. Omitting them tremendously
speeds up processing.
xmpp.connect(): Use the "use_ssl=True" argument when theeffective TCP port equals NotifyXMPP.default_secure_port.
xmpp.connect(): Use the "reattempt=False" argument to
mitigate nasty delay before even connecting to XMPP server.
Heads up
Please note that I had to disable some tests against failures on
get_roster's side effects.