fmorg-git commented on code in PR #9445:
URL: https://github.com/apache/ozone/pull/9445#discussion_r2624505462


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/security/TestSTSSecurityUtil.java:
##########
@@ -314,5 +316,74 @@ public void 
testConstructValidateAndDecryptMultipleTokens() throws Exception {
     assertThat(result2.getOwnerId()).isEqualTo("temp-key-2");
     assertThat(result2.getOriginalAccessKeyId()).isEqualTo("orig-key-2");
   }
-}
 
+  @Test
+  public void testEnsureEssentialFieldsArePresentInTokenMissingExpiry() {
+    final byte[] encryptionBytes = new byte[5];
+    ThreadLocalRandom.current().nextBytes(encryptionBytes);
+    final STSTokenIdentifier tokenIdentifier = new STSTokenIdentifier(

Review Comment:
   I couldn't use `createTokenWithMissingField` for expiration since the 
expiration is set internally via `clock.instant()`.  However, I see how it can 
be confusing, so I updated the `testEnsureEssentialFieldsArePresentInToken*` 
tests so they are consistent.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to