kopia lustrzana https://github.com/Yakifo/amqtt
Merge pull request #284 from ajmirsky/issue_120
Yakifo/amqtt#120 confirms : validate example is functioningpull/288/head
commit
a0330bd980
|
@ -934,6 +934,35 @@ async def test_broker_socket_open_close(broker):
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
std_legacy_config = {
|
||||||
|
"listeners": {
|
||||||
|
"default": {
|
||||||
|
"type": "tcp",
|
||||||
|
"bind": f"127.0.0.1:1883",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sys_interval": 10,
|
||||||
|
"auth": {
|
||||||
|
"allow-anonymous": True,
|
||||||
|
"plugins": ["auth_anonymous"],
|
||||||
|
},
|
||||||
|
"topic-check": {"enabled": False},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_broker_with_legacy_config():
|
||||||
|
|
||||||
|
broker = Broker(config=std_legacy_config)
|
||||||
|
|
||||||
|
await broker.start()
|
||||||
|
await asyncio.sleep(2)
|
||||||
|
|
||||||
|
mqtt_client = MQTTClient(config={'auto_reconnect': False})
|
||||||
|
await mqtt_client.connect()
|
||||||
|
|
||||||
|
await broker.shutdown()
|
||||||
|
|
||||||
|
|
||||||
legacy_config_empty_auth_plugin_list = {
|
legacy_config_empty_auth_plugin_list = {
|
||||||
"listeners": {
|
"listeners": {
|
||||||
|
|
Ładowanie…
Reference in New Issue