Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Add tests for incorrect transaction handling #32

Merged
merged 1 commit into from
Jul 21, 2014

Conversation

tailhook
Copy link
Contributor

This is only a test. I think you'll come up with a fix pretty easily.

In case it's not obvious value in line 247 is QUEUED

@popravich
Copy link
Contributor

Thanks,
I wil add assertion in pool.release method

popravich added a commit that referenced this pull request Jul 21, 2014
Add tests for incorrect transaction handling
@popravich popravich merged commit 484ce6e into aio-libs-abandoned:master Jul 21, 2014
@tailhook tailhook deleted the pool_err_test branch July 21, 2014 12:21
@tailhook
Copy link
Contributor Author

I believe assertion is not good or not enough, because it may hide real exception. It's better to close multi-exec or close connection. I.e. in case like:

try:
  with (yield from pool) as redis:
    redis.multi()
    1/0
    redis.exec()
except ZeroDivisionError:
   print('zero division')

Would be nice to see exception and be able to catch it instead of getting assertion error

popravich added a commit that referenced this pull request Jul 21, 2014
@popravich
Copy link
Contributor

that makes sense

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants