You can probably get this to work with a greenthread and a mock method that uses time.sleep. If you want to get a little bit more elaborate you can make a method that waits on an eventlet Event() so you can be sure that it pauses until you tell it to finish. See CacheConcurrencyTestCase in test_virt for an example.
On May 11, 2011, at 10:31 AM, Chris Behrens wrote:
> Good question. There are XenAPI tests in general which exercise this code (nova/tests/xenapi/*). I don't think I'm going to easily be able to get 2 queries going at once in the tests due to how quickly they execute. Hmm.
> --
> https://code.launchpad.net/~cbehrens/nova/lp766404/+merge/60543
> You are subscribed to branch lp:nova.
You can probably get this to work with a greenthread and a mock method that uses time.sleep. If you want to get a little bit more elaborate you can make a method that waits on an eventlet Event() so you can be sure that it pauses until you tell it to finish. See CacheConcurrenc yTestCase in test_virt for an example.
On May 11, 2011, at 10:31 AM, Chris Behrens wrote:
> Good question. There are XenAPI tests in general which exercise this code (nova/tests/ xenapi/ *). I don't think I'm going to easily be able to get 2 queries going at once in the tests due to how quickly they execute. Hmm. /code.launchpad .net/~cbehrens/ nova/lp766404/ +merge/ 60543
> --
> https:/
> You are subscribed to branch lp:nova.