micro-fan / aiozk

Asyncio client for zookeeper
MIT License
49 stars 20 forks source link

fixed tests and a small bug with create #85

Closed sy-be closed 5 months ago

sy-be commented 6 months ago

Fixes broken tests as described in https://github.com/micro-fan/aiozk/issues/84

In aiozk.transaction.Transaction.commit I think we should also check for the reply to be of type Create2Response (which I added), otherwise result evaluates to False and the context manager test which only calls Transaction.create() never succeeds.

I also added missing pytest.mark.asyncio decorators to test functions & pytest_asyncio.fixture decorators to async fixtures to correctly handle async tests.

Additionally updated base images to help with docker builds, albeit those images also seems to be based on outdated Ubuntu versions.

Nevertheless, my local tox runs now succeed with the changes in this PR

sy-be commented 6 months ago

@cybergrind , please take a look. Thanks!

cybergrind commented 6 months ago

Probably we could make it smaller if use auto mode, could you please check if it do the trick?

# pytest.ini
[pytest]
asyncio_mode = auto
sy-be commented 5 months ago

Nice, thanks! I've reduced the PR further and tests pass.

cybergrind commented 5 months ago

@sy-be thank you! <3 merged

sy-be commented 5 months ago

Awesome, thanks! 🎉