Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EB00E277 for ; Thu, 21 Feb 2013 18:12:58 +0000 (UTC) Received: (qmail 35657 invoked by uid 500); 21 Feb 2013 18:12:57 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 35565 invoked by uid 500); 21 Feb 2013 18:12:57 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 35556 invoked by uid 99); 21 Feb 2013 18:12:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 18:12:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.83.48] (HELO mail-ee0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 18:12:49 +0000 Received: by mail-ee0-f48.google.com with SMTP id t10so4938983eei.21 for ; Thu, 21 Feb 2013 10:12:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:date:message-id:subject :from:to:cc:content-type:x-gm-message-state; bh=1wwxHYW5GKLFddqADvl71G6rH9WW2A7pvab/3au3/Mo=; b=JJLWLGFVn6uu1QWdjEXvKLG1RVuZEzAoTvGiFIeuB5DS/bGULA0eqx4Okx5kFj4YrV 6EukUYCrjomcgdXLAj5H89PxkYpBDBwBi8RyhffmJfY6F5x96DPCKPT2FY9drhoh7fTZ EsM3V4e1t7oQRS/r47nagO7RKEyFoWyigtwhUA6hIiaowkV50qOOlIa1H5K14jN7Ns3X XzbqH21r+bi2GKkremvdVbJ7jGLqTym5yUbWnr90GV15LjJPDYNyZnNPCAQlaACGjyAD 394fhW8ftc+pCXglde3lisCRf1QRvQhGXZK7wmQ6h1MyLp6NvD2JC+sZCKHhenpzNHBm RVDQ== MIME-Version: 1.0 X-Received: by 10.14.202.71 with SMTP id c47mr82451371eeo.39.1361470348568; Thu, 21 Feb 2013 10:12:28 -0800 (PST) Received: by 10.223.172.2 with HTTP; Thu, 21 Feb 2013 10:12:28 -0800 (PST) X-Originating-IP: [117.195.7.58] Date: Thu, 21 Feb 2013 23:42:28 +0530 Message-ID: Subject: [DISCUSS] Multi-threading in test suite From: Girish Shilamkar To: cloudstack-dev@incubator.apache.org Cc: Edison.su@citrix.com, Suresh Sadhu , Ashutosh Kelkar , Chirag Jog Content-Type: multipart/alternative; boundary=047d7b343e387ff4f804d6400487 X-Gm-Message-State: ALoCoQl+JjG9g5lK/q8wHTkiky3liEc1C2mHKX3qf6jmUChYvOCe1HggRuCu3exxTu2tjgquSilE X-Virus-Checked: Checked by ClamAV on apache.org --047d7b343e387ff4f804d6400487 Content-Type: text/plain; charset=ISO-8859-1 Hello, 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 threading.Thread.__init__(self) cloudstackTestCase.__init__(self, args) def run(self): self._target(*self._args) 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. [1] http://confluence.cloudstack.org/display/QA/Snapshots+Improvements+Test+cases Regards, Girish --047d7b343e387ff4f804d6400487--