[ https://issues.apache.org/jira/browse/HADOOP-19129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834156#comment-17834156 ]
ASF GitHub Bot commented on HADOOP-19129: ----------------------------------------- saxenapranav commented on code in PR #6676: URL: https://github.com/apache/hadoop/pull/6676#discussion_r1552980351 ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java: ########## @@ -136,10 +136,10 @@ public void testAbfsStreamOps() throws Exception { } if (fs.getAbfsStore().isAppendBlobKey(fs.makeQualified(largeOperationsFile).toString())) { - // for appendblob data is already flushed, so there is more data to read. + // for appendblob data is already flushed, so there might be more data to read. assertTrue(String.format("The actual value of %d was not equal to the " + "expected value", statistics.getReadOps()), - statistics.getReadOps() == (largeValue + 3) || statistics.getReadOps() == (largeValue + 4)); + statistics.getReadOps() >= largeValue || statistics.getReadOps() <= (largeValue + 4)); Review Comment: what is reason of these condition changing. ########## hadoop-tools/hadoop-azure/dev-support/testrun-scripts/testsupport.sh: ########## @@ -21,8 +21,13 @@ combtestfile=$resourceDir combtestfile+=abfs-combination-test-configs.xml logdir=dev-support/testlogs/ -testresultsregex="Results:(\n|.)*?Tests run:" +testresultsregex="Tests run: [0-9]+, Failures: [0-9]+, Errors: [0-9]+, Skipped: [0-9]+$" +failedTestRegex1="<<< FAILURE!$" +failedTestRegex2="<<< ERROR!$" +removeFormattingRegex="s/\x1b\[[0-9;]*m//g" Review Comment: Lets add a comment to explain what regex do. ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/AbstractAbfsIntegrationTest.java: ########## @@ -532,4 +528,36 @@ protected long assertAbfsStatistics(AbfsStatistic statistic, (long) metricMap.get(statistic.getStatName())); return expectedValue; } + + protected void assumeValidTestConfigPresent(final Configuration conf, final String key) { + String configuredValue = conf.get(key); Review Comment: it should also check conf.get(key.<accountUrl>, as done in `AbfsConfiguration.accountConf(name)`. All the configs are checked on both key and key.<accountUrl>. Dev can give anything. > 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