Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C6598200BB1 for ; Thu, 3 Nov 2016 16:31:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C512E160B0B; Thu, 3 Nov 2016 15:31:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 19DC0160AE5 for ; Thu, 3 Nov 2016 16:31:00 +0100 (CET) Received: (qmail 53906 invoked by uid 500); 3 Nov 2016 15:31:00 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 53890 invoked by uid 99); 3 Nov 2016 15:30:59 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2016 15:30:59 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 642802DC692; Thu, 3 Nov 2016 15:30:59 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5953557407444218978==" MIME-Version: 1.0 Subject: Re: Review Request 53257: HIVE-14960: Improve the stability of TestNotificationListener From: Marta Kuczora To: Barna Zsombor Klara , Peter Vary , Aihua Xu , Chaoyu Tang Cc: hive , Marta Kuczora Date: Thu, 03 Nov 2016 15:30:59 -0000 Message-ID: <20161103153059.1745.87078@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Marta Kuczora X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/53257/ X-Sender: Marta Kuczora References: <20161028100824.9386.27067@reviews.apache.org> In-Reply-To: <20161028100824.9386.27067@reviews.apache.org> Reply-To: Marta Kuczora X-ReviewRequest-Repository: hive-git archived-at: Thu, 03 Nov 2016 15:31:02 -0000 --===============5953557407444218978== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53257/ ----------------------------------------------------------- (Updated Nov. 3, 2016, 3:30 p.m.) Review request for hive, Aihua Xu, Chaoyu Tang, Peter Vary, and Barna Zsombor Klara. Bugs: HIVE-14960 https://issues.apache.org/jira/browse/HIVE-14960 Repository: hive-git Description ------- The TestNotificationListener test fails occasionally. It happens if the testAMQListener method is completed and the recevied messages are checked before the last "DROP_TABLE" message got processed and put to the "actualMessages" list by the onMessage method. As a solution I used a CountDownLatch which count is decreased by 1 when a message is processed. And the "testAMQListener" method will wait for the Latch to reach zero or a maximum time limit before complete. Diffs (updated) ----- hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java 9e03da4 Diff: https://reviews.apache.org/r/53257/diff/ Testing ------- The change effects only a unit test. Ran the test many times locally. Added random sleeps to simulate the delay of the message processing. Thanks, Marta Kuczora --===============5953557407444218978==--