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
--
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]