[
https://issues.apache.org/jira/browse/HADOOP-18865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760241#comment-17760241
]
ASF GitHub Bot commented on HADOOP-18865:
-----------------------------------------
anujmodi2021 commented on code in PR #5987:
URL: https://github.com/apache/hadoop/pull/5987#discussion_r1309675455
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestAbfsClient.java:
##########
@@ -196,6 +197,41 @@ public void verifyUserAgentPrefix()
.doesNotContain(FS_AZURE_USER_AGENT_PREFIX);
}
+ /**
+ * This method represents a unit test for verifying the behavior of the
User-Agent header
+ * with respect to the "Expect: 100-continue" header setting in the Azure
Blob File System (ABFS) configuration.
+ *
+ * The test ensures that the User-Agent string includes or excludes specific
information based on whether the
+ * "Expect: 100-continue" header is enabled or disabled in the configuration.
+ *
+ */
+ @Test
+ public void verifyUserAgentExpectHeader()
+ throws IOException, IllegalAccessException {
+ final Configuration configuration = new Configuration();
+ configuration.addResource(TEST_CONFIGURATION_FILE_NAME);
+ configuration.set(ConfigurationKeys.FS_AZURE_USER_AGENT_PREFIX_KEY,
FS_AZURE_USER_AGENT_PREFIX);
+
configuration.setBoolean(ConfigurationKeys.FS_AZURE_ACCOUNT_IS_EXPECT_HEADER_ENABLED,
true);
+ AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration,
+ ACCOUNT_NAME);
+ String userAgentStr = getUserAgentString(abfsConfiguration, false);
+
+ verifybBasicInfo(userAgentStr);
Review Comment:
nit: Typo: verify_b_BasicInfo
> ABFS: Adding 100 continue in userAgent String and dynamically removing it if
> retry is without the header enabled.
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-18865
> URL: https://issues.apache.org/jira/browse/HADOOP-18865
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 3.3.6
> Reporter: Anmol Asrani
> Assignee: Anmol Asrani
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.3.6
>
>
> Adding 100 continue in userAgent String if enabled in AbfsConfiguration and
> dynamically removing it if retry is without the header enabled.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]