[ 
https://issues.apache.org/jira/browse/AMBARI-26465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang resolved AMBARI-26465.
--------------------------------------
    Resolution: Duplicate

> Python test failures
> --------------------
>
>                 Key: AMBARI-26465
>                 URL: https://issues.apache.org/jira/browse/AMBARI-26465
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.1.0
>            Reporter: Wei-Chiu Chuang
>            Priority: Major
>
> [https://ci-hadoop.apache.org/job/Ambari/job/Ambari-PreCommit-GitHub-PR/job/PR-3943/18/console]
>  
> {noformat}
> ======================================================================
> ERROR: test_download_jdk (TestAmbariServer.TestAmbariServer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-common/src/test/python/mock/mock.py",
>  line 1203, in patched
>     return func(*args, **keywargs)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/test/python/TestAmbariServer.py",
>  line 3362, in test_download_jdk
>     rcode = download_and_install_jdk(args)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 1073, in download_and_install_jdk
>     jdkSetup.download_and_install_jdk(options, properties)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 544, in download_and_install_jdk
>     self._ensure_java_home_env_var_is_set(args.ambari_java_home)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 1032, in _ensure_java_home_env_var_is_set
>     os.environ[JAVA_HOME] = java_home_dir
>   File "/usr/lib/python3.10/os.py", line 685, in __setitem__
>     value = self.encodevalue(value)
>   File "/usr/lib/python3.10/os.py", line 757, in encode
>     raise TypeError("str expected, not %s" % type(value).__name__)
> TypeError: str expected, not MagicMock
> ----------------------------------------------------------------------
> Ran 296 tests in 11.233s
> FAILED (errors=1)
> ----------------------------------------------------------------------
> Failed tests:
> ERROR: test_download_jdk (TestAmbariServer.TestAmbariServer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-common/src/test/python/mock/mock.py",
>  line 1203, in patched
>     return func(*args, **keywargs)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/test/python/TestAmbariServer.py",
>  line 3362, in test_download_jdk
>     rcode = download_and_install_jdk(args)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 1073, in download_and_install_jdk
>     jdkSetup.download_and_install_jdk(options, properties)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 544, in download_and_install_jdk
>     self._ensure_java_home_env_var_is_set(args.ambari_java_home)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/main/python/ambari_server/serverSetup.py",
>  line 1032, in _ensure_java_home_env_var_is_set
>     os.environ[JAVA_HOME] = java_home_dir
>   File "/usr/lib/python3.10/os.py", line 685, in __setitem__
>     value = self.encodevalue(value)
>   File "/usr/lib/python3.10/os.py", line 757, in encode
>     raise TypeError("str expected, not %s" % type(value).__name__)
> TypeError: str expected, not MagicMock
> FAIL: testDBConnectionCheck (TestCheckHost.TestCheckHost)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-common/src/test/python/mock/mock.py",
>  line 1203, in patched
>     return func(*args, **keywargs)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
>  line 135, in testDBConnectionCheck
>     self.assertEqual(
> AssertionError: {'db_[16 chars]': {'exit_code': 1, 'message': 
> "'ambari_java_home'"}} != {'db_[16 chars]': {'message': 'Error downloading 
> DBConnection[115 chars]: 1}}
> - {'db_connection_check': {'exit_code': 1, 'message': "'ambari_java_home'"}}
> + {'db_connection_check': {'exit_code': 1,
> +                          'message': 'Error downloading '
> +                                     'DBConnectionVerification.jar from 
> Ambari '
> +                                     'Server resources. Check network access 
> to '
> +                                     'Ambari Server.\n'
> +                                     'test exception'}}
> FAIL: testUnsupportedDatabaseType (TestCheckHost.TestCheckHost)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-common/src/test/python/mock/mock.py",
>  line 1203, in patched
>     return func(*args, **keywargs)
>   File 
> "/home/jenkins/jenkins-home/workspace/bari-PreCommit-GitHub-PR_PR-3943/ambari-server/src/test/python/custom_actions/TestCheckHost.py",
>  line 630, in testUnsupportedDatabaseType
>     self.assertEqual(
> AssertionError: {'db_[16 chars]': {'exit_code': 1, 'message': 
> "'ambariLevelParams'"}} != {'db_[16 chars]': {'message': "'unsupported_db' 
> database type[29 chars]: 1}}
> - {'db_connection_check': {'exit_code': 1, 'message': "'ambariLevelParams'"}}
> + {'db_connection_check': {'exit_code': 1,
> +                          'message': "'unsupported_db' database type not "
> +                                     'supported.'}} {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to