[
https://issues.apache.org/jira/browse/HDFS-17793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17954227#comment-17954227
]
ASF GitHub Bot commented on HDFS-17793:
---------------------------------------
Copilot commented on code in PR #7714:
URL: https://github.com/apache/hadoop/pull/7714#discussion_r2108281647
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncRpc.java:
##########
@@ -89,4 +89,10 @@ public void testgetGroupsForUser() throws Exception {
public void testConcurrentCallExecutorInitial() {
assertNull(rndRouter.getRouterRpcClient().getExecutorService());
}
+
+
+ @Test
+ public void testgetDelegationToken() throws Exception {
+ rndRouter.getFileSystem().getDelegationToken("yarn");
Review Comment:
This test does not include any assertions to verify the returned token or
expected error; add assertions (e.g., assertNotNull or expected exception) to
validate behavior.
```suggestion
// Get the delegation token for the user "yarn".
org.apache.hadoop.security.token.Token<?> token =
rndRouter.getFileSystem().getDelegationToken("yarn");
// Assert that the token is not null.
assertNotNull(token, "Delegation token should not be null");
// Optionally, verify additional properties of the token.
assertEquals("yarn", token.getService().toString(),
"The token service should match the requested user");
```
> RBF: Enable the router asynchronous RPC feature to handle getDelegationToken
> request errors
> -------------------------------------------------------------------------------------------
>
> Key: HDFS-17793
> URL: https://issues.apache.org/jira/browse/HDFS-17793
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Xiping Zhang
> Assignee: Xiping Zhang
> Priority: Major
> Labels: pull-request-available
> Attachments: image-2025-05-27-10-58-55-652.png,
> image-2025-05-27-10-59-27-965.png, image-2025-05-27-11-04-40-734.png,
> image-2025-05-27-11-27-09-710.png
>
>
> !image-2025-05-27-10-58-55-652.png|width=1209,height=230!
> !image-2025-05-27-10-59-27-965.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]