HDFS-14466. Add a regression test for HDFS-14323.
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
cdcc205490
commit
00dd843a1a
@ -494,4 +494,18 @@ public void testWebHdfsBackwardCompatibleSpecialCharacterFile()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWebHdfsUrlEncoding() throws Exception {
|
||||
final WebHdfsFileSystem fs =
|
||||
(WebHdfsFileSystem) FileSystem.get(uri, WebHdfsTestUtil.createConf());
|
||||
|
||||
// characters which should not be urlencoded.
|
||||
final String unreserved = "_-!.~'()*";
|
||||
final String punct = ",:$&=";
|
||||
String path = "/testWebHdfsUrlEncoding" + unreserved + punct;
|
||||
URL url =
|
||||
WebHdfsTestUtil.toUrl(fs, GetOpParam.Op.LISTSTATUS, new Path(path));
|
||||
WebHdfsTestUtil.LOG.info(url.getPath());
|
||||
assertEquals(WebHdfsFileSystem.PATH_PREFIX + path, url.getPath());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user