diff options
| author | Ewan Mellor <ewan.mellor@citrix.com> | 2010-07-29 09:08:31 +0100 |
|---|---|---|
| committer | Ewan Mellor <ewan.mellor@citrix.com> | 2010-07-29 09:08:31 +0100 |
| commit | bc96d6daa425f7c38d67ad43b8cf46f3ba5989c3 (patch) | |
| tree | 057ef6bedf567ff072af12358e1e3b1cbd2c97c5 | |
| parent | c3ad356680c011f1efc551601da392a252b6c0fa (diff) | |
| download | nova-bc96d6daa425f7c38d67ad43b8cf46f3ba5989c3.tar.gz nova-bc96d6daa425f7c38d67ad43b8cf46f3ba5989c3.tar.xz nova-bc96d6daa425f7c38d67ad43b8cf46f3ba5989c3.zip | |
Replace the second singleton unit test, lost during a merge.
| -rw-r--r-- | nova/tests/process_unittest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/process_unittest.py b/nova/tests/process_unittest.py index f5f304aa2..75187e1fc 100644 --- a/nova/tests/process_unittest.py +++ b/nova/tests/process_unittest.py @@ -120,3 +120,10 @@ class ProcessTestCase(test.TrialTestCase): pool2 = process.SharedPool() self.assertEqual(id(pool1._instance), id(pool2._instance)) + def test_shared_pool_works_as_singleton(self): + d1 = process.simple_execute('sleep 1') + d2 = process.simple_execute('sleep 0.005') + # lp609749: would have failed with + # exceptions.AssertionError: Someone released me too many times: + # too many tokens! + return d1 |
