Commit 0b992c8c authored by Stavros Sachtouris's avatar Stavros Sachtouris

Forgot smth

parent 2b74ab4a
......@@ -322,53 +322,6 @@ class testCyclades(unittest.TestCase):
self.client = cyclades(url, token)
pass
@if_not_all
def test_parallel_creation(self):
"""test create with multiple threads"""
from kamaki.clients import SilentEvent
c1 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c2 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c3 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c4 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c5 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c6 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c7 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c8 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
print('START THREADS')
c1.start()
c2.start()
c3.start()
c4.start()
c5.start()
c6.start()
c7.start()
c8.start()
print('KEWL')
def tearDown(self):
"""Destoy servers used in testing"""
print
......@@ -462,6 +415,53 @@ class testCyclades(unittest.TestCase):
return None
return foo
@if_not_all
def test_parallel_creation(self):
"""test create with multiple threads"""
from kamaki.clients import SilentEvent
c1 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c2 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c3 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c4 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c5 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c6 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
c7 = SilentEvent(self._create_server,
self.servname1,
self.flavorid,
self.img)
c8 = SilentEvent(self._create_server,
self.servname2,
self.flavorid + 2,
self.img)
print('START THREADS')
c1.start()
c2.start()
c3.start()
c4.start()
c5.start()
c6.start()
c7.start()
c8.start()
print('KEWL')
def assert_dicts_are_deeply_equal(self, d1, d2):
for k, v in d1.items():
self.assertTrue(k in d2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment