[
https://issues.apache.org/jira/browse/HADOOP-19778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055284#comment-18055284
]
ASF GitHub Bot commented on HADOOP-19778:
-----------------------------------------
cnauroth commented on code in PR #8207:
URL: https://github.com/apache/hadoop/pull/8207#discussion_r2743552733
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestWasbInitFailure.java:
##########
@@ -0,0 +1,52 @@
+package org.apache.hadoop.fs.azure;
+
+import java.net.URI;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+
+import static org.apache.hadoop.test.LambdaTestUtils.intercept;
+
+/**
+ * Test to verify WASB initialization fails as expected.
+ */
+public class TestWasbInitFailure {
+
+ /**
+ * Test that initialization of Non-secure WASB FileSystem fails as expected.
+ * @throws Exception on any failure
+ */
+ @Test
+ public void testWasbInitFails() throws Exception {
+ URI wasbUri = URI.create("wasb://[email protected]");
+ assertFailure(wasbUri);
+ }
+
+ /**
+ * Test that initialization of Secure WASB FileSystem fails as expected.
+ * @throws Exception on any failure
+ */
+ @Test
+ public void testSecureWasbInitFails() throws Exception {
+ URI wasbUri =
URI.create("wasbs://[email protected]");
+ assertFailure(wasbUri);
+ }
+
+ private void assertFailure(URI uri) throws Exception {
+ Configuration conf = new Configuration();
+ IllegalArgumentException ex = intercept(IllegalArgumentException.class, ()
-> {
+ FileSystem.newInstance(uri, conf).close();
+ });
+ Assertions.assertThat(ex.getMessage())
+ .contains("WASB Driver using wasb(s) schema is No longer Supported.");
Review Comment:
Do these assertions pass now? There was earlier code review feedback to fix
capitalization ("is no longer supported"), but it wasn't changed here.
> Remove Deprecated WASB Code from Hadoop
> ---------------------------------------
>
> Key: HADOOP-19778
> URL: https://issues.apache.org/jira/browse/HADOOP-19778
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.4.2
> Reporter: Anuj Modi
> Assignee: Anuj Modi
> Priority: Major
> Labels: pull-request-available
>
> WASB Driver has been deprecated for a while now:
> https://issues.apache.org/jira/browse/HADOOP-19178
> Starting with hadoop-3.5.0 we will no longer ship WASB Driver as a official
> hadoop-connector for Azure.
> Moving ahead ABFS Driver will be the only official Hadoop connector for both
> types of Accounts that is "Heirarchichal Namespace Enabled (HNS)" and
> "Heirarchichal Namespace Disabled (FNS)"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]