HDFS-2233. Add WebUI tests with URI reserved chars. Contributed by Eli Collins
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1158025 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b2b976a03b
commit
2ab3433e0e
@ -663,6 +663,8 @@ Trunk (unreleased changes)
|
|||||||
HDFS-2237. Change UnderReplicatedBlocks from public to package private.
|
HDFS-2237. Change UnderReplicatedBlocks from public to package private.
|
||||||
(szetszwo)
|
(szetszwo)
|
||||||
|
|
||||||
|
HDFS-2233. Add WebUI tests with URI reserved chars. (eli)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-1458. Improve checkpoint performance by avoiding unnecessary image
|
HDFS-1458. Improve checkpoint performance by avoiding unnecessary image
|
||||||
|
@ -82,31 +82,22 @@ public void testViewFileJsp() throws IOException {
|
|||||||
try {
|
try {
|
||||||
cluster = new MiniDFSCluster.Builder(CONF).build();
|
cluster = new MiniDFSCluster.Builder(CONF).build();
|
||||||
cluster.waitActive();
|
cluster.waitActive();
|
||||||
|
String paths[] = {
|
||||||
testViewingFile(cluster, "/test-file", false);
|
"/test-file",
|
||||||
testViewingFile(cluster, "/tmp/test-file", false);
|
"/tmp/test-file",
|
||||||
testViewingFile(cluster, "/tmp/test-file%with goofy&characters", false);
|
"/tmp/test-file%with goofy&characters",
|
||||||
|
"/foo bar/foo bar",
|
||||||
testViewingFile(cluster, "/test-file", true);
|
"/foo+bar/foo+bar",
|
||||||
testViewingFile(cluster, "/tmp/test-file", true);
|
"/foo;bar/foo;bar",
|
||||||
testViewingFile(cluster, "/tmp/test-file%with goofy&characters", true);
|
"/foo=bar/foo=bar",
|
||||||
|
"/foo,bar/foo,bar",
|
||||||
testViewingFile(cluster, "/foo bar", true);
|
"/foo?bar/foo?bar",
|
||||||
testViewingFile(cluster, "/foo+bar", true);
|
"/foo\">bar/foo\">bar"
|
||||||
testViewingFile(cluster, "/foo;bar", true);
|
};
|
||||||
testViewingFile(cluster, "/foo=bar", true);
|
for (String p : paths) {
|
||||||
testViewingFile(cluster, "/foo,bar", true);
|
testViewingFile(cluster, p, false);
|
||||||
testViewingFile(cluster, "/foo?bar", true);
|
testViewingFile(cluster, p, true);
|
||||||
testViewingFile(cluster, "/foo\">bar", true);
|
}
|
||||||
|
|
||||||
testViewingFile(cluster, "/foo bar", false);
|
|
||||||
// See HDFS-2233
|
|
||||||
//testViewingFile(cluster, "/foo+bar", false);
|
|
||||||
//testViewingFile(cluster, "/foo;bar", false);
|
|
||||||
testViewingFile(cluster, "/foo=bar", false);
|
|
||||||
testViewingFile(cluster, "/foo,bar", false);
|
|
||||||
testViewingFile(cluster, "/foo?bar", false);
|
|
||||||
testViewingFile(cluster, "/foo\">bar", false);
|
|
||||||
} finally {
|
} finally {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
Loading…
Reference in New Issue
Block a user