steveloughran commented on a change in pull request #1893: HADOOP-16920 ABFS:
Make list page size configurable
URL: https://github.com/apache/hadoop/pull/1893#discussion_r393299366
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsClient.java
##########
@@ -75,4 +89,80 @@ public void testUnknownHost() throws Exception {
"UnknownHostException: " + fakeAccountName,
() -> FileSystem.get(conf.getRawConfiguration()));
}
+
+ @Test
+ public void testListPathWithValidListMaxResultsValues()
+ throws IOException, ExecutionException, InterruptedException {
+ final int fileCount = 10;
+ final String directory = "testWithValidListMaxResultsValues";
+ createDirectoryWithNFiles(directory, fileCount);
+ final int[] testData = {fileCount + 100, fileCount + 1, fileCount,
+ fileCount - 1, 1};
+ for (int i = 0; i < testData.length; i++) {
+ int listMaxResults = testData[i];
+ setListMaxResults(listMaxResults);
+ int expectedListResultsSize =
+ listMaxResults > fileCount ? fileCount : listMaxResults;
+ assertThat(listPath(directory).size(),
Review comment:
use assertJ here and below. It is way better because of the better errors it
gives, e.g.
assertThat(listPath).describedAs(...).hasSize(...)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]