anujmodi2021 commented on code in PR #7419: URL: https://github.com/apache/hadoop/pull/7419#discussion_r2083814160
########## hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/delegation/ITestSessionDelegationInFilesystem.java: ########## @@ -306,21 +307,22 @@ public void testCanRetrieveTokenFromCurrentUserCreds() throws Throwable { LOG.info("Token = " + token0); Token<?> token1 = requireNonNull( ugi.getCredentials().getToken(service), "Token from " + service); - assertEquals("retrieved token", token0, token1); - assertNotNull("token identifier of " + token1, - token1.getIdentifier()); + assertEquals(token0, token1, "retrieved token"); + assertNotNull(token1.getIdentifier(), + "token identifier of " + token1); } @Test public void testDTCredentialProviderFromCurrentUserCreds() throws Throwable { describe("Add credentials to the current user, " + "then verify that they can be found when S3ADelegationTokens binds"); Credentials cred = createDelegationTokens(); - assertThat("Token size", cred.getAllTokens(), hasSize(1)); + assertThat(cred.getAllTokens()).hasSize(1). Review Comment: Yes. Got it. Agreed on having a single usage across repo. But yeah it won't be easy to replace all current ones and definitely not as a part of this effort. But moving ahead for new tests we can try to directly use AssertJ. Will keep this in mind while working on patches and reviewing as well. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org