hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19020) TestXmlParsing exception checking relies on a particular xml implementation without declaring it.
Date Wed, 18 Oct 2017 20:36:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-19020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16209985#comment-16209985
] 

Hudson commented on HBASE-19020:
--------------------------------

SUCCESS: Integrated in Jenkins build HBase-1.1-JDK8 #2009 (See [https://builds.apache.org/job/HBase-1.1-JDK8/2009/])
HBASE-19020 HBase Rest test for xml parsing external entities should not (busbey: rev a8dfa464d5bc88224ed6582b666a791364a85556)
* (edit) hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java


> TestXmlParsing exception checking relies on a particular xml implementation without declaring
it.
> -------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-19020
>                 URL: https://issues.apache.org/jira/browse/HBASE-19020
>             Project: HBase
>          Issue Type: Bug
>          Components: dependencies, REST
>    Affects Versions: 1.3.0, 1.4.0, 1.2.5, 1.1.9, 2.0.0-alpha-1
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>             Fix For: 3.0.0, 1.4.0, 1.3.2, 1.5.0, 1.2.7, 1.1.13, 2.0.0-alpha-4
>
>         Attachments: HBASE-19020.0.patch
>
>
> The test added in HBASE-17424 is overly specific:
> {code}
>   @Test
>   public void testFailOnExternalEntities() throws Exception {
>     final String externalEntitiesXml =
>         "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
>         + " <!DOCTYPE foo [ <!ENTITY xxe SYSTEM \"/tmp/foo\"> ] >"
>         + " <ClusterVersion>&xee;</ClusterVersion>";
>     Client client = mock(Client.class);
>     RemoteAdmin admin = new RemoteAdmin(client, HBaseConfiguration.create(), null);
>     Response resp = new Response(200, null, externalEntitiesXml.getBytes());
>     when(client.get("/version/cluster", Constants.MIMETYPE_XML)).thenReturn(resp);
>     try {
>       admin.getClusterVersion();
>       fail("Expected getClusterVersion() to throw an exception");
>     } catch (IOException e) {
>       final String exceptionText = StringUtils.stringifyException(e);
>       final String expectedText = "The entity \"xee\" was referenced, but not declared.";
>       LOG.error("exception text: " + exceptionText, e);
>       assertTrue("Exception does not contain expected text", exceptionText.contains(expectedText));
>     }
>   }
> {code}
> Specifically, when running against Hadoop 3.0.0-beta1 this test fails because the exception
text is different, though I'm still figuring out why.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message