Andrew Mirsky
b2ef44dce2
Merge branch '0.11.2-rc' into increased_test_coverage
2025-07-03 14:32:45 -04:00
Andrew Mirsky
a2e5a67059
resolves Yakifo/amqtt#250 : * was being blocked as a valid topic character in publish/receive, even though the invalid topic wildcard characters are '#' and '+'. also, add test coverage for error cases when creating different packet types.
2025-07-03 14:32:13 -04:00
Andrew Mirsky
7bbf2990a2
fixing issue with python 3.10's handling of websocket states
2025-07-03 11:43:16 -04:00
Andrew Mirsky
d78c184f86
Merge remote-tracking branch 'source/0.11.2-rc' into issues/27
2025-07-03 11:36:44 -04:00
Andrew Mirsky
6b606f04d3
Merge pull request #244 from ajmirsky/require_at_least_one_auth
...
Require at least one auth
2025-07-03 11:21:22 -04:00
Andrew Mirsky
d0d875ca30
python 3.10 differentiates between asyncio.TimeoutError and builtin TimeoutError
2025-07-02 14:13:02 -04:00
Andrew Mirsky
51d8c838f7
client reconnecting too quickly causing connection failure
2025-07-02 14:01:53 -04:00
Andrew Mirsky
341c6c1732
additional test cases for message retention for retain flag and disconnected state
2025-07-02 08:09:31 -04:00
Andrew Mirsky
2ceb2ae43b
resolves Yakifo/amqtt#27 Yakifo/amqtt#246 Yakifo/amqtt#123 : only retain messages for clients which specify clean session = 1 and messages are QoS 1 & 2. Also, clients which are completely anonymous, specifying no username, have no expectation of message retention.
2025-07-01 22:00:18 -04:00
Andrew Mirsky
ee7250c720
fixes Yakifo/amqtt#187 : explicitly declaring auth plugins as an empty list (entry points configuration style) or not including a BaseAuthPlugin in loaded plugins, still allowed clients to connect to broker. security risk as explicit omission (former) or inadvertent omission (latter) might allow anonymous connections
2025-06-30 14:08:01 -04:00
Andrew Mirsky
043b6ac881
check for client connect/disconnect event needed change
2025-06-29 17:47:02 -04:00
Andrew Mirsky
a5487b5cef
Merge branch 'rc' into event_strenum
2025-06-15 10:35:31 -04:00
Andrew Mirsky
99a9594e9f
creating MQTTEvents enumeration instead of individual string names. consolidating into a single file to eliminate import errors
2025-06-15 10:21:41 -04:00
Andrew Mirsky
efd8c15375
removing xfail
2025-06-15 06:31:48 -04:00
Andrew Mirsky
b0cf416c36
using a strenum instead of enum. creating events as well as client/broker events as well
2025-06-14 21:28:00 -04:00
Andrew Mirsky
e2842dd7e5
Merge pull request #202 from ajmirsky/issues/86
...
verify that issue #86 has been fixed
2025-06-14 09:53:42 -04:00
Andrew Mirsky
51102a435b
converting from event strings to a string enumeration
2025-06-13 16:17:22 -04:00
Andrew Mirsky
e69cb12652
fixing test case for python 3.12
2025-06-09 12:21:22 -04:00
Andrew Mirsky
18bfb6d9c5
python 3.12 requires the connect packet before forcing the socket to disconnect
2025-06-09 00:24:40 -04:00
Andrew Mirsky
2b1599e6af
fixes Yakifo/amqtt#86 : verify that the issue has been fixed
2025-06-08 22:42:49 -04:00
Andrew Mirsky
1f2f7a1f79
since the amqtt broker (and MQTT 3.1) requires that that a CONNECT packet be received for a valid socket connection, need to send one (See BrokerProtocolHandler.init_from_connect) otherewise, the connection is immediately closed. asyncio's behavior in python 3.10, 3.11 & 3.13 seems to defer processing the 'read_or_raise' from the socket. however, python 3.12 prioritizes the 'read_or_raise' in the loop so it, triggers a NoDataError, terminating the socket before we can verify in the test.
2025-05-19 12:45:45 -04:00
MVladislav
12d5cb6866
refactor: modularize broker listener startup and improve session management
...
- Extracted listener startup logic into a separate method `_start_listeners` for better readability and maintainability.
- Created helper methods for SSL context creation.
- Improved session cleanup during shutdown by centralizing logic in `_cleanup_session`.
- Refactored message handling and subscription management into dedicated methods for clarity.
- Updated tests to reflect changes in method visibility for matching topics.
2025-04-06 19:03:30 +02:00
MVladislav
40d1214c79
refactor: checking open pull requests:
...
- #119 :: not working in test cases, only comment
- #153 :: updated
- #61 :: removed try block as described
- #72 :: function included
2025-01-12 21:28:42 +01:00
MVladislav
a024b174d0
refactor: more cleanup/linting
2025-01-12 20:52:50 +01:00
MVladislav
1a72fa8e39
refactor: formatting
2024-12-29 19:23:27 +01:00
MVladislav
7c001d69b2
refactor: bigger code upgrade and improves
...
- add github workflows
- update project.toml by disable multi parts to not see every needed fix now
- improve tests cases
- improve code quality
- ...
2024-12-21 11:52:26 +01:00
MVladislav
7cc746e483
refactor: base cleanup and bring project to run with test cases
2024-12-19 20:34:09 +01:00
Marius Kriegerowski
7fcdb0c13b
broker: release server connection upon exception
2023-02-11 15:53:13 +01:00
Marius Kriegerowski
4944b0deae
unit testing tcp connection to the broker
2023-02-11 15:53:06 +01:00
Fabian Elsner
96e89fb37f
Fix test for Python 3.7
2023-02-09 12:42:48 +01:00
Fabian Elsner
604c45ca7a
Added test for broadcast loop cancellation
2023-02-09 12:42:48 +01:00
Florian Ludwig
9628a1ce3e
remove deprecated loop parameter from tests
2022-01-11 12:55:04 +01:00
Stuart Longland
5315e2d865
broker tests: Fix reference to TimeoutError.
...
Seems Python 3.8+ moved it, and I took the reference from there.
2021-08-17 16:20:27 +02:00
Stuart Longland
3b793a706b
broker tests: Clean up flake8 warnings
2021-08-17 16:20:27 +02:00
Stuart Longland
bf5279911b
Pass code through `black` formatter
2021-08-17 16:20:27 +02:00
Stuart Longland
29854264e3
broker tests: Change passwords for user[1…3]
...
As pointed out, it's possible to accidentally mix them up if the
passwords are the same. Obviously, the passwords used for these tests
should _NOT_ be used in production.
2021-08-17 16:20:27 +02:00
Stuart Longland
db5e886c7e
broker tests: Add system test for publish authorisation
2021-08-17 16:20:27 +02:00
Florian Ludwig
e1c73fc53a
update imports in tests
2021-03-27 17:49:55 +01:00
Marius Kriegerowski
613e77f6b4
more strict flake8. Fixed typos.
2021-03-17 10:57:32 +01:00
lrasku
c41b01499d
Fix topic filter matching
...
- re.escape() the whole filter string first to escape _all_ regex
metacharacters in it, not just $. (# and + are both regex metacharacters,
so their replace expressions now need a leading \\ to replace the
escaping, too.)
- # matches topics both with and without a trailing /, so the replace
expressions adds a '?' before the '.*'. The .lstrip('?') at the end removes
this in case the # was the first character in the filter.
- + should only match a single level, but it should _also_ match empty levels,
so use '[^/]*' to replace it.
- Use Regex.fullmatch() to match against the whole topic string, not just
its start.
Also add two unit tests to test this matching, and fix an incorrect match
against + in test_client_subscribe_publish_dollar_topic_2.
2021-03-15 13:43:47 +01:00
Marius Kriegerowski
7921e2cc22
linter project with black at default line length 88
2021-03-15 10:18:00 +01:00
Marius Kriegerowski
db3dffa857
use black linter with 96 char line length
2021-03-14 21:44:41 +01:00
Florian Ludwig
7276075ed8
move broker into pytest fixture
2021-03-09 19:13:32 +01:00
Florian Ludwig
5c58fcd59c
rework broker tests to use pytest-asyncio
2021-03-09 19:13:32 +01:00
Marius Kriegerowski
6f586c253c
Fix missing plugin property
2021-03-09 19:13:32 +01:00
Marius Kriegerowski
080a358dd7
Patch MagicMock to asyncronize
2021-03-09 19:13:32 +01:00
Marius Kriegerowski
e0fabc0bc3
Refactor to comply python3.8
2021-03-09 19:13:32 +01:00
Florian Ludwig
bd58685028
mark failing tasts as allowed to fail
2021-03-08 21:08:35 +01:00
Guillaume Desvé
31888f8e69
python3.7 support
2018-06-29 15:56:27 +02:00
mi3z
465b2cfc42
changed localhost to 127.0.0.1 to fix Travis CI test
2017-11-17 10:11:26 +01:00