diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2015-04-12 15:03:34 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2015-04-12 15:03:34 +0000 |
| commit | 3a7a946e952545d34966a5569839b631df92e448 (patch) | |
| tree | 2c4b45c3c404d623dc7d4ede882a4eae8f02b148 /qpid/java/systests/src | |
| parent | b096615214f5368b0f302954c0c642b057c49301 (diff) | |
| download | qpid-python-3a7a946e952545d34966a5569839b631df92e448.tar.gz | |
QPID-5818 : [Java Broker] creating children from within the configuration thread leads to deadlock as the configuration thread blocks waiting for a task which cannot be executed because it needs the config thread. Instead use asynchronous child creation.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1673014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests/src')
| -rw-r--r-- | qpid/java/systests/src/test/java/org/apache/qpid/systest/rest/VirtualHostNodeRestTest.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/qpid/java/systests/src/test/java/org/apache/qpid/systest/rest/VirtualHostNodeRestTest.java b/qpid/java/systests/src/test/java/org/apache/qpid/systest/rest/VirtualHostNodeRestTest.java index 083187b8db..6efdeace9e 100644 --- a/qpid/java/systests/src/test/java/org/apache/qpid/systest/rest/VirtualHostNodeRestTest.java +++ b/qpid/java/systests/src/test/java/org/apache/qpid/systest/rest/VirtualHostNodeRestTest.java @@ -63,6 +63,29 @@ public class VirtualHostNodeRestTest extends QpidRestTestCase assertFalse("Store should not exist after deletion", storePathAsFile.exists()); } + public void testCreateVirtualHostNodeWithVirtualHost() throws Exception + { + String nodeName = "virtualhostnode-" + getTestName(); + + Map<String, Object> nodeData = new HashMap<String, Object>(); + nodeData.put(VirtualHostNode.NAME, nodeName); + nodeData.put(VirtualHostNode.TYPE, getTestProfileVirtualHostNodeType()); + + nodeData.put("virtualHostInitialConfiguration", "{ \"type\" : \"DERBY\" }"); + + getRestTestHelper().submitRequest("virtualhostnode/" + nodeName, + "PUT", + nodeData, + HttpServletResponse.SC_CREATED); + + + Map<String, Object> virtualhostNode = getRestTestHelper().getJsonAsSingletonList("virtualhostnode/" + nodeName); + Asserts.assertVirtualHostNode(nodeName, virtualhostNode); + + Map<String, Object> virtualhost = getRestTestHelper().getJsonAsSingletonList("virtualhost/" + nodeName + "/" + nodeName); + Asserts.assertVirtualHost(nodeName, virtualhost); + } + public void testCreateVirtualHostNodeWithDefaultStorePath() throws Exception { String virtualhostNodeType = getTestProfileVirtualHostNodeType(); |
