This is an automated email from the ASF dual-hosted git repository. sekikn pushed a commit to branch AMBARI-25865 in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
commit 2b5343a0efec1d67007b17bcb541e817acac8795 Author: Kengo Seki <sek...@apache.org> AuthorDate: Fri Feb 24 14:43:41 2023 +0900 AMBARI-25865: Fix an unit test failure on ambari-metrics-host-monitoring --- ambari-metrics-host-monitoring/pom.xml | 6 +----- ambari-metrics-host-monitoring/src/test/python/unitTests.py | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ambari-metrics-host-monitoring/pom.xml b/ambari-metrics-host-monitoring/pom.xml index be27cae..0b4f637 100644 --- a/ambari-metrics-host-monitoring/pom.xml +++ b/ambari-metrics-host-monitoring/pom.xml @@ -44,7 +44,7 @@ <fileset> <directory>${project.basedir}/src/main/python/psutil/build/</directory> <includes> - <include>**/*</include> + <include>**</include> </includes> <followSymlinks>false</followSymlinks> </fileset> @@ -188,10 +188,6 @@ <exec dir="${basedir}/src/main/python/psutil" executable="${executable.python}" failonerror="true"> <arg value="setup.py" /> <arg value="build" /> - <arg value="--build-temp" /> - <arg value="${basedir}/target/psutil_build_temp" /> - <arg value="--build-base" /> - <arg value="${basedir}/target/psutil_build" /> </exec> </target> </configuration> diff --git a/ambari-metrics-host-monitoring/src/test/python/unitTests.py b/ambari-metrics-host-monitoring/src/test/python/unitTests.py index 7445546..f4aa845 100644 --- a/ambari-metrics-host-monitoring/src/test/python/unitTests.py +++ b/ambari-metrics-host-monitoring/src/test/python/unitTests.py @@ -100,8 +100,11 @@ def main(): test_mask = TEST_MASK tests = get_test_files(pwd, mask=test_mask, recursive=True) - shuffle(tests) modules = [os.path.basename(s)[:-3] for s in tests] + # Workaround for AMBARI-25865. This avoids loading psutil too early. + i = modules.index("TestHostInfo") + if -1 < i: + modules.append(modules.pop(i)) suites = [unittest.defaultTestLoader.loadTestsFromName(name) for name in modules] testSuite = unittest.TestSuite(suites) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@ambari.apache.org For additional commands, e-mail: commits-h...@ambari.apache.org