[ https://issues.apache.org/jira/browse/HADOOP-19415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17950817#comment-17950817 ]
ASF GitHub Bot commented on HADOOP-19415: ----------------------------------------- slfan1989 commented on code in PR #7419: URL: https://github.com/apache/hadoop/pull/7419#discussion_r2083692437 ########## 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: Thank you for raising this question! Personally, I believe we should go with AssertJ, as it aligns with our future direction. My suggestion is to first upgrade the unit tests to JUnit 5, and then gradually replace some of the JUnit assertions with AssertJ. This might take some time, as there are a large number of unit tests across the project that need to be updated. > Upgrade JUnit from 4 to 5 in hadoop-common. > ------------------------------------------- > > Key: HADOOP-19415 > URL: https://issues.apache.org/jira/browse/HADOOP-19415 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Shilun Fan > Assignee: Shilun Fan > Priority: Major > Labels: pull-request-available > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org