Sleep longer while holding an acquired pool to increase the likelihood of creating more instances, but only while the max instances has not been reached. If we unconditionally sleep for 1 second the max_size==1 case takes too long. If we unconditionally sleep for to short a time the test can fail on fast computers. So instead we sleep for a relatively long time while it is desired and sleep the minimum amount of time while once we achieved what we set out to do: create max_size amount of instances.
Sleep longer while holding an acquired pool to increase the likelihood of creating more instances, but only while the max instances has not been reached.
If we unconditionally sleep for 1 second the max_size==1 case takes too long.
If we unconditionally sleep for to short a time the test can fail on fast computers.
So instead we sleep for a relatively long time while it is desired and sleep the minimum amount of time while once we achieved what we set out to do: create max_size amount of instances.

mosquito/aio-pika