[ https://issues.apache.org/jira/browse/HADOOP-19129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832777#comment-17832777 ]
ASF GitHub Bot commented on HADOOP-19129: ----------------------------------------- anujmodi2021 commented on code in PR #6676: URL: https://github.com/apache/hadoop/pull/6676#discussion_r1546127193 ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsClient.java: ########## @@ -102,11 +103,31 @@ public void testListPathWithValidListMaxResultsValues() setListMaxResults(listMaxResults); int expectedListResultsSize = listMaxResults > fileCount ? fileCount : listMaxResults; - Assertions.assertThat(listPath(directory.toString())).describedAs( - "AbfsClient.listPath result should contain %d items when " - + "listMaxResults is %d and directory contains %d items", - expectedListResultsSize, listMaxResults, fileCount) - .hasSize(expectedListResultsSize); + + AbfsRestOperation op = getFileSystem().getAbfsClient().listPath( Review Comment: This test is supposed to test the client behavior only. We have other tests to test recursive behavior as part of ITestAzureBlobFileSystemListStatus.java > ABFS: Fixing Test Script Bug and Some Known test Failures in ABFS Test Suite > ---------------------------------------------------------------------------- > > Key: HADOOP-19129 > URL: https://issues.apache.org/jira/browse/HADOOP-19129 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.4.0, 3.4.1 > Reporter: Anuj Modi > Assignee: Anuj Modi > Priority: Major > Labels: pull-request-available > > Test Script used by ABFS to validate changes has following two issues: > # When there are a lot of test failures or when error message of any failing > test becomes very large, the regex used today to filter test results does not > work as expected and fails to report all the failing tests. > To resolve this, we have come up with new regex that will only target one > line test names for reporting them into aggregated test results. > # While running the test suite for different combinations of Auth type and > account type, we add the combination specific configs first and then include > the account specific configs in core-site.xml file. This will override the > combination specific configs like auth type if the same config is present in > account specific config file. To avoid this, we will first include the > account specific configs and then add the combination specific configs. > Due to above bug in test script, some test failures in ABFS were not getting > our attention. This PR also targets to resolve them. Following are the tests > fixed: > # ITestAzureBlobFileSystemAppend.testCloseOfDataBlockOnAppendComplete(): It > was failing only when append blobs were enabled. In case of append blobs we > were not closing the active block on outputstrea,close() due to which > block.close() was not getting called and assertions around it were failing. > Fixed by updating the production code to close the active block on flush. > # ITestAzureBlobFileSystemAuthorization: Tests in this class works with an > existing remote filesystem instead of creating a new file system instance. > For this they require file system configured in account settings using > following config: "fs.contract.test.fs.abfs". Tests weref ailing with NPE > when this config was not present. Updated code to skip thsi test if required > config is not present. > # ITestAbfsClient.testListPathWithValueGreaterThanServerMaximum(): Test was > failing Intermittently only for HNS enabled accounts. Test wants to assert > that client.listPath() does not return more objects than what is configured > in maxListResults. Assertions should be that number of objects returned could > be less than expected as server might end up returning even lesser due to > partition splits along with a continuation token. > # ITestGetNameSpaceEnabled.testGetIsNamespaceEnabledWhenConfigIsTrue(): Fail > when "fs.azure.test.namespace.enabled" config is missing. Ignore the test if > config is missing. > # ITestGetNameSpaceEnabled.testGetIsNamespaceEnabledWhenConfigIsFalse(): > Fail when "fs.azure.test.namespace.enabled" config is missing. Ignore the > test if config is missing. > # ITestGetNameSpaceEnabled.testNonXNSAccount(): Fail when > "fs.azure.test.namespace.enabled" config is missing. Ignore the test if > config is missing. > # ITestAbfsStreamStatistics.testAbfsStreamOps: Fails when > "fs.azure.test.appendblob.enabled" is set to true. Test wanted to assert that > number of read operations can be more in case of append blobs as compared to > normal blob because of automatic flush. It could be same as that of normal > blob as well. > # ITestAzureBlobFileSystemCheckAccess.testCheckAccessForAccountWithoutNS: > Fails for FNS Account only when following config is present: > fs.azure.account.hns.enabled". Failure is because test wants to assert that > when driver does not know if the account is HNS enabled or not it makes a > server call and fails. But above config is letting driver know the account > type and skipping the head call. Remove these configs from the test specific > configurations and not from the account settings file. > # ITestAbfsTerasort.test_120_terasort: Fails with OAuth on HNS account. > Failure is because of identity mismatch. OAuth uses service principle OID as > owner of the resources whereas Shared Key uses local system identities. Fix > is to set configs that will allow overwrite of OID to localidentity. This > will require a new config to be set by user that specify which OID has to be > substituted. OAuth by default uses Superuser Identity, so same needs to be > configured to be overwritten as well. > *New test config: > "fs.azure.account.oauth2.client.service.principal.object.id"* > # ITestExponentialRetryPolicy.testThrottlingIntercept: Fails with SharedKey > only. Test was using a dummy account to create a new instance of > AbfsConfiguration and for that dummy account, SharedKey was not configured. > Fix is to Add non-account specific SharedKey in accountconfigs. > # ITestAzureBlobFileSystemLease:testTwoCreate(): Fail when > "fs.azure.test.namespace.enabled" config is missing. Fix is to Ignore the > test if config is missing. > # ITestAzureBlobFileSystemChecksum.testAppendWithChecksumAtDifferentOffsets: > Test fails with append blob enabled because position parameter in append call > was passed wrong. Fixed the test to work with append blobs. -- 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