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 126A8200BD4 for ; Thu, 1 Dec 2016 09:13:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 112EF160B25; Thu, 1 Dec 2016 08:13:50 +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 4FEB3160B3B for ; Thu, 1 Dec 2016 09:13:48 +0100 (CET) Received: (qmail 51555 invoked by uid 500); 1 Dec 2016 08:13:45 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 50430 invoked by uid 99); 1 Dec 2016 08:13:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2016 08:13:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F1CFAF1759; Thu, 1 Dec 2016 08:13:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: swapan@apache.org To: commits@ambari.apache.org Date: Thu, 01 Dec 2016 08:14:31 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [48/50] ambari git commit: AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas) archived-at: Thu, 01 Dec 2016 08:13:50 -0000 AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b53d070 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b53d070 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b53d070 Branch: refs/heads/branch-feature-AMBARI-18901 Commit: 7b53d07040fee054fa3592da69d9d7f68b3adfd9 Parents: a5ce823 Author: Robert Levas Authored: Wed Nov 30 20:40:12 2016 -0500 Committer: Robert Levas Committed: Wed Nov 30 20:40:12 2016 -0500 ---------------------------------------------------------------------- .../org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7b53d070/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java index 4135919..ce0b387 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java @@ -211,11 +211,13 @@ public class UpgradeCatalog250Test { public void testExecuteDMLUpdates() throws Exception { Method updateAmsConfigs = UpgradeCatalog250.class.getDeclaredMethod("updateAMSConfigs"); Method updateKafkaConfigs = UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs"); + Method updateHiveLlapConfigs = UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs"); Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); UpgradeCatalog250 upgradeCatalog250 = createMockBuilder(UpgradeCatalog250.class) .addMockedMethod(updateAmsConfigs) .addMockedMethod(updateKafkaConfigs) + .addMockedMethod(updateHiveLlapConfigs) .addMockedMethod(addNewConfigurationsFromXml) .createMock(); @@ -229,6 +231,9 @@ public class UpgradeCatalog250Test { upgradeCatalog250.updateKafkaConfigs(); expectLastCall().once(); + upgradeCatalog250.updateHiveLlapConfigs(); + expectLastCall().once(); + replay(upgradeCatalog250); upgradeCatalog250.executeDMLUpdates();