Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-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 0AA6918CA3 for ; Wed, 24 Feb 2016 01:59:28 +0000 (UTC) Received: (qmail 40481 invoked by uid 500); 24 Feb 2016 01:59:18 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 40395 invoked by uid 500); 24 Feb 2016 01:59:18 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 40373 invoked by uid 99); 24 Feb 2016 01:59:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 01:59:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 185BB2C1F58 for ; Wed, 24 Feb 2016 01:59:18 +0000 (UTC) Date: Wed, 24 Feb 2016 01:59:18 +0000 (UTC) From: "Hudson (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-14821) Unit tests doesn't export scripts from common-services folder into PYTHONPATH 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/AMBARI-14821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15160051#comment-15160051 ] Hudson commented on AMBARI-14821: --------------------------------- SUCCESS: Integrated in Ambari-trunk-Commit #4378 (See [https://builds.apache.org/job/Ambari-trunk-Commit/4378/]) AMBARI-14821: Unit tests doesn't export scripts from common-services (jaoki: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d032056754246880a48939255784767bc31302e4]) * ambari-server/src/test/python/unitTests.py > Unit tests doesn't export scripts from common-services folder into PYTHONPATH > ----------------------------------------------------------------------------- > > Key: AMBARI-14821 > URL: https://issues.apache.org/jira/browse/AMBARI-14821 > Project: Ambari > Issue Type: Bug > Reporter: Newton Alex > Assignee: Newton Alex > Priority: Minor > Fix For: trunk > > Attachments: AMBARI-14821_trunk.patch > > > When running unit tests with mocks like > --------------- > @patch ('hawqmaster.common.__set_osparams') > @patch ('hawqmaster.master_helper.__is_active_master') > @patch ('hawqmaster.master_helper.__is_local_initialized') > def test_start_default(self, is_local_initialized_mock, active_master_mock, set_osparams_mock): > ... > ---------------- > the unit tests fail with the following msg: > -------- > Failed tests: > ERROR: test_configure_default (test_hawqmaster.TestHawqMaster) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-common/src/test/python/mock/mock.py", line 1191, in patched > arg = patching.__enter__() > File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-common/src/test/python/mock/mock.py", line 1250, in __enter__ > self.target = self.getter() > File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-common/src/test/python/mock/mock.py", line 1412, in > getter = lambda: _importer(target) > File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-common/src/test/python/mock/mock.py", line 1096, in _importer > thing = __import__(import_path) > ImportError: No module named hawqmaster > --------- > the source scripts from common-services are not getting exported into PYTHONPATH during unittest execution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)