[ https://issues.apache.org/jira/browse/AMBARI-24207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Levas resolved AMBARI-24207. ----------------------------------- Resolution: Fixed > Python unit test failure on 2.7.6 > --------------------------------- > > Key: AMBARI-24207 > URL: https://issues.apache.org/jira/browse/AMBARI-24207 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.7.0 > Reporter: Doroszlai, Attila > Assignee: Robert Levas > Priority: Major > Labels: pull-request-available > Fix For: 2.7.1 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > Python unit tests fail on Python 2.7.6, because > [SSLContext|https://docs.python.org/2/library/ssl.html#ssl-contexts] was only > added in 2.7.9. > {noformat:title=https://builds.apache.org/job/Ambari-trunk-Commit/9543/consoleText} > ERROR: test_ldap_sync_ssl (TestAmbariServer.TestAmbariServer) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/test/python/mock/mock.py", > line 1199, in patched > return func(*args, **keywargs) > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/TestAmbariServer.py", > line 7804, in test_ldap_sync_ssl > sync_ldap(options) > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/setupSecurity.py", > line 405, in sync_ldap > raise FatalException(1, err) > FatalException: "Fatal exception: Sync event creation failed. Error details: > 'module' object has no attribute 'SSLContext', exit code 1" > ERROR: test_get_ssl_context (TestServerUtils.TestServerUtils) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/test/python/mock/mock.py", > line 1199, in patched > return func(*args, **keywargs) > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/TestServerUtils.py", > line 124, in test_get_ssl_context > context = get_ssl_context(properties) > File > "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/serverUtils.py", > line 274, in get_ssl_context > context = ssl.SSLContext(protocol) > AttributeError: 'module' object has no attribute 'SSLContext' > {noformat} > CC [~rlevas] -- This message was sent by Atlassian JIRA (v7.6.3#76005)