incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Girish Shilamkar <>
Subject [DISCUSS] Multi-threading in test suite
Date Thu, 21 Feb 2013 18:12:28 GMT

We are automating the snapshot improvement tests cases [1] from the QA
plans page. Some of the test scenarios there involve concurrent spawning of
virtual machines, creating snapshots on ROOT disk and live migrating
machines to another host while snapshot process is in progress.

We are trying to automate the scenario by creating multiple threads within
a test case. This is achieved by creating a thread class within a test
suite and initializing constructors of base class.

class createThread(threading.Thread, cloudstackTestCase):

    def __init__(self, target, *args):

        self._target = target

        self._args = args


        cloudstackTestCase.__init__(self, args)

    def run(self):


The problem here is creating a new thread doesn't inherit logger other
objects from the main thread and logs all errors/exceptions console. Using
main thread's logging would either require to collect and send messages to
main thread via messagequeue or initializing loggers again in createThread
class. Is it fine to do so in a test suite? Or multi-threading should be
incorporated within marvin framework. Also, can you think of any better way
to implement this?

Please let me know your thoughts.




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message