[
https://issues.apache.org/jira/browse/HBASE-19210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250739#comment-16250739
]
Ted Yu commented on HBASE-19210:
--------------------------------
I run this code by itself which passed (note the legitimate call at the end):
{code}
@Test
public void testInvalidNamespacePuts() throws IOException, JAXBException {
Admin admin = TEST_UTIL.getAdmin();
Response response;
// Check that namespaces don't exist via non-REST call.
assertNull(findNamespace(admin, NAMESPACE1));
assertNull(findNamespace(admin, NAMESPACE2));
// Test cannot PUT (alter) non-existent namespace.
byte[] json = Bytes.toBytes(jsonMapper.writeValueAsString(model2));
response = client.put(namespacePath2, Constants.MIMETYPE_JSON, json);
assertEquals(403, response.getCode());
// Try REST post and puts with invalid content.
response = client.post(namespacePath1, Constants.MIMETYPE_JSON,
toXML(model1));
assertEquals(500, response.getCode());
response = client.put(namespacePath2, Constants.MIMETYPE_XML, json);
assertEquals(400, response.getCode());
// Create namespace via XML and JSON.
response = client.post(namespacePath1, Constants.MIMETYPE_XML,
toXML(model1));
assertEquals(201, response.getCode());
}
{code}
> TestNamespacesInstanceResource fails
> ------------------------------------
>
> Key: HBASE-19210
> URL: https://issues.apache.org/jira/browse/HBASE-19210
> Project: HBase
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ted Yu
> Fix For: 2.0.0-beta-1
>
> Attachments: 19210.v1.txt, 19210.v1.txt, 19210.v2.txt, 19210.v3.txt,
> HBASE-19210.WIP.patch
>
>
> This is the top flaky test.
> The following can be reproduced:
> {code}
> java.net.SocketException: Connection reset
> at
> org.apache.hadoop.hbase.rest.TestNamespacesInstanceResource.testInvalidNamespacePostsAndPuts(TestNamespacesInstanceResource.java:271)
> {code}
> With commit e320df5a0c267258c03909da8d0eee4c0e287532, the test passes.
> With commit 5facaded902a13556952b1f9d26b768cb86e6599, the test fails.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)