mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.23k stars 187 forks source link

bugfix: kwargs not working in aio_pika connect_robust #531

Closed miburk closed 1 year ago

miburk commented 1 year ago

I provide a fix, so that the kwargs are passed down through connection_class in aio_pika.connect_robust().

In current master branch specifying fail_fast has no effect and the default values are used.

Following code will fail on master branch:

import asyncio
import aio_pika

async def main():
    con = await aio_pika.connect_robust(fail_fast="False")
    async with con:
        assert con.fail_fast == False

asyncio.run(main())

This PR fixes connect() and connect_robust() and extends and fixes the existing unit tests.

coveralls commented 1 year ago

Coverage Status

Coverage: 88.911% (+0.05%) from 88.862% when pulling 15c9e0eca7937260d6c38b40313ea68c088a0814 on miburk:hotfix/make_fail_fast_working_as_kwarg into 12b6f29d3294a07eccef56e00f87711724edfb79 on mosquito:master.