Madhan Neethiraj created RANGER-5527:
----------------------------------------

             Summary: unit tests failure in TestLdapUserGroupBuilder
                 Key: RANGER-5527
                 URL: https://issues.apache.org/jira/browse/RANGER-5527
             Project: Ranger
          Issue Type: Bug
          Components: usersync
    Affects Versions: 3.0.0, 2.9.0
            Reporter: Madhan Neethiraj
            Assignee: Madhan Neethiraj


Following unit tests fail in my local build consistently:
{noformat}
[ERROR] Failures:
[ERROR]   
TestLdapUserGroupBuilder.testU_user_config_fields_reflect_properties_and_timestamps_initialized:411
 expected: <true> but was: <false>
[ERROR]   
TestLdapUserGroupBuilder.testW_getGroups_processes_groups_and_memberships:638 
expected: <true> but was: <false>{noformat}
 

This is due to the tests not accounting for timezone where they are run. The 
tests expect following expression in LdapUserGroupBuilder.java:155 to return a 
string starting with "1970" - like {{19700101000000 }}but it returns 
{{19691231160000}} in PDT:

{{new SimpleDateFormat("yyyyMMddHHmmss").format(new Date(0))}}

 

These tests need to be updated to account for timezone.



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

Reply via email to