Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0CDD119DC for ; Fri, 18 Apr 2014 17:17:39 +0000 (UTC) Received: (qmail 61889 invoked by uid 500); 18 Apr 2014 17:17:26 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 61772 invoked by uid 500); 18 Apr 2014 17:17:25 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 61750 invoked by uid 99); 18 Apr 2014 17:17:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2014 17:17:25 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 98.139.253.105 is neither permitted nor denied by domain of kihwal@yahoo-inc.com) Received: from [98.139.253.105] (HELO mrout2-b.corp.bf1.yahoo.com) (98.139.253.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2014 17:17:21 +0000 Received: from GQ1-EX10-CAHT10.y.corp.yahoo.com (gq1-ex10-caht10.corp.gq1.yahoo.com [10.87.93.109]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id s3IHGdMt023712 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 18 Apr 2014 10:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1397841401; bh=K0RC/I6VOjFwnML76zJSSxqOQsn4msnVc+Pj68gcuZI=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=wIRW+pEJxsK2vMA9a0YTxyyG4ghsDtDyHRARCztBo8Nu8iGk+8iz5r7e/zAWjrqE6 oFQdvBv1HTd1VdjoyVN4sp3DM71t9Sm4H4JZnr6WUnsGP90as6iTN4Sdf61XLxaKvK R6pEW8eoVE9pDm8z46QhonX3/HzAx2wn5GhspwG0= Received: from GQ1-MB01-02.y.corp.yahoo.com ([fe80::a049:b5af:9055:ada6]) by GQ1-EX10-CAHT10.y.corp.yahoo.com ([fe80::48f1:668:81:f6f3%16]) with mapi id 14.03.0181.006; Fri, 18 Apr 2014 10:16:39 -0700 From: Kihwal Lee To: "mapreduce-dev@hadoop.apache.org" , "yarn-dev@hadoop.apache.org" CC: "common-dev@hadoop.apache.org" , hwx-hdfs-dev Subject: Re: Policy on adding timeouts to tests Thread-Topic: Policy on adding timeouts to tests Thread-Index: AQHPWACM/SWRlag6R0SJf+hr+G5KTZsTeOAAgAI2OoCAAhZTAA== Date: Fri, 18 Apr 2014 17:16:38 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.1.140326 x-originating-ip: [10.74.126.37] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 841400002 X-Virus-Checked: Checked by ClamAV on apache.org The most common mistake is making incorrect assumptions on test/component run-time. We often forget how slower/faster things can be on different platforms and how the load on the machine at the time of test execution affect the run time. If not sure, leave it to surefire. If things run generally slow on certain environment and the 10 min timeout generates many false positives, it is easier to adjust. But early detection of failures is still preferred, if possible. Some are using timeout for validating performance in unit tests. This should not be done in unit tests. Also, many test issues have been due to incorrect assumptions on the ordering/timing of events and resulting state updates. These test cases usually timeout waiting for certain state to be reached. Kihwal On 4/16/14, 11:24 PM, "Vinod Kumar Vavilapalli" wrote: >The other advantage of timeout is early failure - earlier than the uber >10 min timeout that seems to exist in the build files. Usually the >test-writer has a general idea of how long the test is supposed to run >and if that doesn't happen, we can fail early. Clearly, this involves >choosing a reasonable timeout so that the test can pass on local >machines, different OSes and/or in VMs. > >+Vinod > >On Apr 15, 2014, at 11:37 AM, Chris Nauroth >wrote: > >> +common-dev, hdfs-dev >>=20 >> My understanding of the current situation is that we had a period where >>we >> tried to enforce adding timeouts on all new tests in patches, but it >>caused >> trouble, and now we're back to not requiring it. Jenkins test-patch >>isn't >> checking for it anymore. >>=20 >> I don't think patches are getting rejected for using timeouts though. >>=20 >> The difficulty is that execution time is quite sensitive to the build >> environment. (Consider top-of-the-line server hardware used in build >> infrastructure vs. a dev running a VirtualBox VM with 1 dedicated CPU, >>2 GB >> RAM and slow virtualized disk.) When we were enforcing timeouts, it was >> quite common to see follow-up patches tuning up the timeout settings to >> make tests work reliably in a greater variety of environments. At that >> point, the benefit of using the timeout becomes questionable, because >>now >> the fast machine is running with the longer timeout too. >>=20 >> Chris Nauroth >> Hortonworks >> http://hortonworks.com/ >>=20 >>=20 >>=20 >> On Mon, Apr 14, 2014 at 9:41 AM, Karthik Kambatla >>wrote: >>=20 >>> Hi folks >>>=20 >>> Just wanted to check what our policy for adding timeouts to tests is. >>>Do we >>> encourage/discourage using timeouts for tests? If we discourage using >>> timeouts for tests in general, are we okay with adding timeouts for a >>>few >>> tests where we explicitly want the test to fail if it takes longer >>>than a >>> particular amount of time? >>>=20 >>> Thanks >>> Karthik >>>=20 >>=20 >> --=20 >> CONFIDENTIALITY NOTICE >> NOTICE: This message is intended for the use of the individual or >>entity to=20 >> which it is addressed and may contain information that is confidential, >> privileged and exempt from disclosure under applicable law. If the >>reader=20 >> of this message is not the intended recipient, you are hereby notified >>that=20 >> any printing, copying, dissemination, distribution, disclosure or >> forwarding of this communication is strictly prohibited. If you have >> received this communication in error, please contact the sender >>immediately=20 >> and delete it from your system. Thank You. > > >--=20 >CONFIDENTIALITY NOTICE >NOTICE: This message is intended for the use of the individual or entity >to=20 >which it is addressed and may contain information that is confidential, >privileged and exempt from disclosure under applicable law. If the reader >of this message is not the intended recipient, you are hereby notified >that=20 >any printing, copying, dissemination, distribution, disclosure or >forwarding of this communication is strictly prohibited. If you have >received this communication in error, please contact the sender >immediately=20 >and delete it from your system. Thank You.