kopia lustrzana https://github.com/Yakifo/amqtt
Merge branch 'rc' into event_strenum
commit
a5487b5cef
|
@ -167,7 +167,7 @@ class Broker:
|
|||
self.config.update(config)
|
||||
self._build_listeners_config(self.config)
|
||||
|
||||
self._loop = loop or asyncio.new_event_loop()
|
||||
self._loop = loop or asyncio.get_running_loop()
|
||||
self._servers: dict[str, Server] = {}
|
||||
self._init_states()
|
||||
self._sessions: dict[str, tuple[Session, BrokerProtocolHandler]] = {}
|
||||
|
|
|
@ -54,11 +54,10 @@ def broker_main(
|
|||
typer.echo(f"❌ Config file error: {exc}", err=True)
|
||||
raise typer.Exit(code=1) from exc
|
||||
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
try:
|
||||
broker = Broker(config)
|
||||
broker = Broker(config, loop=loop)
|
||||
except (BrokerError, ParserError, PluginError) as exc:
|
||||
typer.echo(f"❌ Broker failed to start: {exc}", err=True)
|
||||
raise typer.Exit(code=1) from exc
|
||||
|
|
|
@ -13,10 +13,6 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
# test broker sys
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(
|
||||
reason="see https://github.com/Yakifo/aio-amqtt/issues/215",
|
||||
strict=False,
|
||||
)
|
||||
async def test_broker_sys_plugin() -> None:
|
||||
|
||||
class MockEntryPoints:
|
||||
|
|
|
@ -631,10 +631,6 @@ async def test_client_subscribe_publish_dollar_topic_2(broker):
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(
|
||||
reason="see https://github.com/Yakifo/aio-amqtt/issues/16",
|
||||
strict=False,
|
||||
)
|
||||
async def test_client_publish_retain_subscribe(broker):
|
||||
sub_client = MQTTClient()
|
||||
await sub_client.connect("mqtt://127.0.0.1", cleansession=False)
|
||||
|
|
Ładowanie…
Reference in New Issue