From yarn-issues-return-169861-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jul 15 14:53:01 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 93D1B180595 for ; Mon, 15 Jul 2019 16:53:01 +0200 (CEST) Received: (qmail 65164 invoked by uid 500); 15 Jul 2019 14:53:00 -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 65153 invoked by uid 99); 15 Jul 2019 14:53:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2019 14:53:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 570B2E2E8D for ; Mon, 15 Jul 2019 14:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0F09E2658C for ; Mon, 15 Jul 2019 14:53:00 +0000 (UTC) Date: Mon, 15 Jul 2019 14:53:00 +0000 (UTC) From: "Adam Antal (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (YARN-9679) Regular code cleanup in TestResourcePluginManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-9679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Antal reassigned YARN-9679: -------------------------------- Assignee: Adam Antal > Regular code cleanup in TestResourcePluginManager > ------------------------------------------------- > > Key: YARN-9679 > URL: https://issues.apache.org/jira/browse/YARN-9679 > Project: Hadoop YARN > Issue Type: Improvement > Reporter: Szilard Nemeth > Assignee: Adam Antal > Priority: Major > Labels: newbie > > There are several things could be cleaned up in this class: > 1. stubResourcePluginmanager should be private. > 2. In tearDown, the result of dest.delete() should be checked > 3. In class CustomizedResourceHandler, there are several methods where exceptions decalarations are unnecessary. > 4. Class MyMockNM should be renamed to some more meaningful name. > 5. There are some danling javadoc comments, for example: > {code:java} > /* > * Make sure ResourcePluginManager is initialized during NM start up. > */ > {code} > 6. There are some exceptions unnecessarily declared on test methods but they are never thrown, an example: > testLinuxContainerExecutorWithResourcePluginsEnabled > 7. Assert.assertTrue(false); expressions should be replaced with Assert.fail() > 8. A handful of usages of Mockito's spy method. This method is not preferred so we should think about replacing it with mocks, somehow. > The rest can be figured out by whoever takes this jira :) -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org