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 AF4C5200AE8 for ; Tue, 3 May 2016 10:45:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AE0091609F3; Tue, 3 May 2016 10:45:14 +0200 (CEST) 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 021CC1609F2 for ; Tue, 3 May 2016 10:45:13 +0200 (CEST) Received: (qmail 68902 invoked by uid 500); 3 May 2016 08:45:13 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 68890 invoked by uid 99); 3 May 2016 08:45:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 08:45:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 004012C1F64 for ; Tue, 3 May 2016 08:45:13 +0000 (UTC) Date: Tue, 3 May 2016 08:45:12 +0000 (UTC) From: "John Zhuge (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-4994) Use MiniYARNCluster with try-with-resources in tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 08:45:14 -0000 [ https://issues.apache.org/jira/browse/YARN-4994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15268376#comment-15268376 ] John Zhuge commented on YARN-4994: ---------------------------------- bq. Last week I created a new JIRA ticket to follow up this. Please check YARN-5007. Is it fine with you if I resolve it with the ticket I linked? Good plan. Unit test failures may be unrelated. To be sure, run the same tests on a clean tree before your patch. BTW, I do hit test errors in TestYarnClient, TestGetGroups, and TestAMRMProxy on Ubuntu 14.04. > Use MiniYARNCluster with try-with-resources in tests > ---------------------------------------------------- > > Key: YARN-4994 > URL: https://issues.apache.org/jira/browse/YARN-4994 > Project: Hadoop YARN > Issue Type: Improvement > Components: test > Affects Versions: 2.7.0 > Reporter: Andras Bokor > Assignee: Andras Bokor > Priority: Trivial > Fix For: 2.7.0 > > Attachments: HDFS-10287.01.patch, HDFS-10287.02.patch, HDFS-10287.03.patch > > > In tests MiniYARNCluster is used with the following pattern: > In try-catch block create a MiniYARNCluster instance and in finally block close it. > [Try-with-resources|https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html] is preferred since Java7 instead of the pattern above. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org