Janus Chow created HDDS-4736:
--------------------------------

             Summary: Eliminate test failure caused by testExpiredCertificate
                 Key: HDDS-4736
                 URL: https://issues.apache.org/jira/browse/HDDS-4736
             Project: Hadoop Distributed Data Store
          Issue Type: Improvement
            Reporter: Janus Chow


In the test case of TestOzoneBlockTokenSecretManager.testExpiredCertificate(), 
there is a chance that the cert becomes not expired, which will cause the PR 
check failure as follows:

 
{code:java}
[INFO] Running org.apache.hadoop.ozone.security.TestOzoneBlockTokenSecretManager
Error:  Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.296 
s <<< FAILURE! - in 
org.apache.hadoop.ozone.security.TestOzoneBlockTokenSecretManager
Error:  
testExpiredCertificate(org.apache.hadoop.ozone.security.TestOzoneBlockTokenSecretManager)
  Time elapsed: 0.13 s  <<< FAILURE!
java.lang.AssertionError: Expected test to throw (an instance of 
org.apache.hadoop.hdds.security.token.BlockTokenException and exception with 
message a string containing "Block token can't be verified due to expired 
certificate")
        at org.junit.Assert.fail(Assert.java:88)
        at 
org.junit.rules.ExpectedException.failDueToMissingException(ExpectedException.java:184)
        at 
org.junit.rules.ExpectedException.access$100(ExpectedException.java:85)
        at 
org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:170)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
{code}
In order to eliminate this failure, we can set the time of the token to a past 
time.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to