From 5f62041cb1200b4dc5d26ab387e63919115a6d2c Mon Sep 17 00:00:00 2001 From: tedyu Date: Mon, 22 Jan 2018 10:47:12 -0800 Subject: [PATCH] HBASE-19832 TestConfServlet#testWriteJson fails against hadoop3 due to spelling change --- .../org/apache/hadoop/hbase/http/conf/TestConfServlet.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/conf/TestConfServlet.java b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/conf/TestConfServlet.java index 8bd1e6d38bd..174d63564db 100644 --- a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/conf/TestConfServlet.java +++ b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/conf/TestConfServlet.java @@ -19,7 +19,9 @@ package org.apache.hadoop.hbase.http.conf; import java.io.StringReader; import java.io.StringWriter; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -60,6 +62,9 @@ public class TestConfServlet extends TestCase { ConfServlet.writeResponse(getTestConf(), sw, "json"); String json = sw.toString(); boolean foundSetting = false; + Set programSet = new HashSet<>(); + programSet.add("programatically"); + programSet.add("programmatically"); Object parsed = JSON.parse(json); Object[] properties = ((Map)parsed).get("properties"); for (Object o : properties) { @@ -69,7 +74,7 @@ public class TestConfServlet extends TestCase { String resource = (String)propertyInfo.get("resource"); System.err.println("k: " + key + " v: " + val + " r: " + resource); if (TEST_KEY.equals(key) && TEST_VAL.equals(val) - && "programatically".equals(resource)) { + && programSet.contains(resource)) { foundSetting = true; } }