benjamin-hodgson / asynqp

An AMQP library for asyncio
MIT License
84 stars 29 forks source link

Fixed heartbeat #46

Closed TarasLevelUp closed 9 years ago

TarasLevelUp commented 9 years ago

Fixed heartbeat logic to be more accurate on interval. Fixed great number of tracebacks in tests for not closed heartbeat.

TarasLevelUp commented 9 years ago

Please don't set _log_destroy_pending to False... It was not intended to be used that way. We need to fix problems, not hide them =(

benjamin-hodgson commented 9 years ago

There are a large number of unit tests which leave tasks incomplete because (for the purposes of the test) they're not interested in what happens when the task completes. I set _log_destroy_pending in those tests because I don't want to see a load of spurious errors. They're unit tests, so it's fine.

If you have a better suggestion for how to automatically close down all open tasks at the end of a test then I'm listening :ear:

TarasLevelUp commented 9 years ago

If you have a better suggestion for how to automatically close down all open tasks at the end of a test then I'm listening :ear: Close the coroutines by hand even in tests and wait for them to be closed (this way we will see if any of them raised an error). You will need to save all async tasks in code anyway, cause you want to log if some of them fail.