Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-5010

Validity schedule unit tests fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0, 2.6.0
    • plugins
    • None

    Description

      pradeep and vikkumar reported following test failures TestRangerValidityScheduleConditionEvaluator.
       

      [INFO] Running org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator
      [ERROR] Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.01 s <<< FAILURE! - in org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator
      [ERROR] org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testBothStartAndEndTime  Time elapsed: 0.007 s  <<< FAILURE!
      org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
      	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
      	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
      	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
      	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:179)
      	at org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testBothStartAndEndTime(TestRangerValidityScheduleConditionEvaluator.java:61)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      
      [ERROR] org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testMultipleSchedules  Time elapsed: 0.001 s  <<< FAILURE!
      org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
      	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
      	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
      	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
      	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:179)
      	at org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testMultipleSchedules(TestRangerValidityScheduleConditionEvaluator.java:112)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      
      [ERROR] org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testOnlyEndTime  Time elapsed: 0 s  <<< FAILURE!
      org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
      	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
      	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
      	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
      	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
      	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
      	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:227)
      	at org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testOnlyEndTime(TestRangerValidityScheduleConditionEvaluator.java:96)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      
      [ERROR] org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testOnlyStartTime  Time elapsed: 0 s  <<< FAILURE!
      org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
      	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
      	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
      	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
      	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
      	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:179)
      	at org.apache.ranger.plugin.conditionevaluator.TestRangerValidityScheduleConditionEvaluator.testOnlyStartTime(TestRangerValidityScheduleConditionEvaluator.java:77)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      

       

      This issue was reproducible when env variable TZ (equivalent of Java system property user.timezone) was set to value other than GMT, like IST.

      Attachments

        1. RANGER-5010.patch
          1 kB
          Madhan Neethiraj

        Issue Links

          Activity

            People

              madhan Madhan Neethiraj
              madhan Madhan Neethiraj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: