You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Swapan Shridhar (JIRA)" <ji...@apache.org> on 2017/12/08 21:53:01 UTC

[jira] [Commented] (AMBARI-21816) test_kms_server timing issue

    [ https://issues.apache.org/jira/browse/AMBARI-21816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284292#comment-16284292 ] 

Swapan Shridhar commented on AMBARI-21816:
------------------------------------------

Moved it to 3.0 as I am started the 2.6.1 release process.

> test_kms_server timing issue
> ----------------------------
>
>                 Key: AMBARI-21816
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21816
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>            Reporter: Doroszlai, Attila
>            Priority: Minor
>             Fix For: 3.0.0, 2.6.1
>
>
> Python unit test in {{test_kms_server}} occasionally fails due to timing.  Expected and actual output use two separate calls to get current time, which may be different if happens to be executed around the turn of a second.
> {noformat}
> FAIL: test_start_secured (test_kms_server.TestRangerKMS)
> ----------------------------------------------------------------------
> 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/stacks/2.5/RANGER_KMS/test_kms_server.py", line 522, in test_start_secured
>     mode = 0644
>   File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/stacks/utils/RMFTestCase.py", line 330, in assertResourceCalled
>     self.assertEquals(kwargs, resource.arguments)
> AssertionError: {'owner': 'kms', 'content': '<ranger>\n<enabled>2017-08-25 11:02:46</enabled>\n< [truncated]... != {'content': '<ranger>\n<enabled>2017-08-25 11:02:45</enabled>\n</ranger>', 'owne [truncated]...
> - {'content': '<ranger>\n<enabled>2017-08-25 11:02:46</enabled>\n</ranger>',
> ?                                                   ^
> + {'content': '<ranger>\n<enabled>2017-08-25 11:02:45</enabled>\n</ranger>',
> ?                                                   ^
> -  'group': 'kms',
> +  'group': u'kms',
> ?           +
>    'mode': 420,
> -  'owner': 'kms'}
> +  'owner': u'kms'}
> ?           +
> {noformat}
> Affected code: {{test_start_default}} and {{test_start_secured}} in {{ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)