tomscut commented on code in PR #5184:
URL: https://github.com/apache/hadoop/pull/5184#discussion_r1049118757
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAllResolver.java:
##########
@@ -191,6 +193,21 @@ private void testAll(final String path) throws Exception {
assertDirsEverywhere(path, 9);
assertFilesDistributed(path, 15);
+ // Test truncate
+ String testTruncateFile = path + "/dir2/dir22/dir220/file-truncate.txt";
+ createTestFile(routerFs, testTruncateFile);
+ Path testTruncateFilePath = new Path(testTruncateFile);
+ routerFs.truncate(testTruncateFilePath, 10);
+ TestFileTruncate.checkBlockRecovery(testTruncateFilePath,
+ (DistributedFileSystem) routerFs);
+ assertEquals("Truncate file fails", 10,
Review Comment:
```suggestion
assertEquals("Truncate file fails", 10,
```
--
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]