diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-09-10 14:41:08 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-09-10 14:41:08 +0000 |
| commit | a483a47e1e8b4f8f497cc24489560549622502b3 (patch) | |
| tree | 081ea5c583054dcbce1c0fd618e2c07283cd9637 /java/systests/etc | |
| parent | 04804de5a167a6addeff6c1c874bd06ef84e1330 (diff) | |
| download | qpid-python-a483a47e1e8b4f8f497cc24489560549622502b3.tar.gz | |
QPID-2092 Move test configuration to systest package and update to provide an more reliable way of adjusting the configuration form the test. In doing this it made sense to udpate the configurations such that they all inherit from the cannonical config.xml from the broker package. Each test now gets its own configuration file that is used to override the defaut values in config.xml.
So the config is now a hierarchy of:
- Test Specific
- Systest adjustments
- stock broker config.xml
I have disabled the DerbyMessageStoreLoggingTest as after making this change it is more reliably throwing a Derby exception on broker startup.
The other changes to the tests were to ensure they correctly save the Test Specific config file before loading. As for some reason, Commons Configuration is not abiding by the optional flag.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@813461 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/etc')
| -rw-r--r-- | java/systests/etc/config-systests-ServerConfigurationTest-New.xml | 93 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-ServerConfigurationTest-Old.xml | 72 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-acl-settings.xml | 139 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-acl.xml | 29 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-derby-settings.xml | 64 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-derby.xml | 29 | ||||
| -rw-r--r-- | java/systests/etc/config-systests-settings.xml | 29 | ||||
| -rw-r--r-- | java/systests/etc/config-systests.xml | 29 | ||||
| -rw-r--r-- | java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml | 40 |
9 files changed, 524 insertions, 0 deletions
diff --git a/java/systests/etc/config-systests-ServerConfigurationTest-New.xml b/java/systests/etc/config-systests-ServerConfigurationTest-New.xml new file mode 100644 index 0000000000..33cc90b895 --- /dev/null +++ b/java/systests/etc/config-systests-ServerConfigurationTest-New.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + + This is an example config using the BDBMessageStore available from + the Red Hat Messaging project at etp.108.redhat.com and distributed under GPL. + --> + +<broker> + <work>${QPID_WORK}</work> + <conf>${QPID_HOME}/etc</conf> + <passwordDir>${conf}</passwordDir> + <connector> + <transport>nio</transport> + <port>5672</port> + <socketReceiveBuffer>32768</socketReceiveBuffer> + <socketSendBuffer>32768</socketSendBuffer> + </connector> + <management> + <enabled>false</enabled> + <jmxport>8999</jmxport> + </management> + <advanced> + <filterchain enableExecutorPool="true"/> + <enablePooledAllocator>false</enablePooledAllocator> + <enableDirectBuffers>false</enableDirectBuffers> + <framesize>65535</framesize> + <compressBufferOnQueue>false</compressBufferOnQueue> + </advanced> + + <security> + <principal-databases> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${passwordDir}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> + + <access> + <class>org.apache.qpid.server.security.access.plugins.AllowAll</class> + </access> + <jmx> + <access>${passwordDir}/jmxremote.access</access> + <principal-database>passwordfile</principal-database> + </jmx> + </security> + + <virtualhosts> + <virtualhost> + <name>dev-only</name> + <dev-only> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + <environment-path>${work}/bdbstore/dev-only-store</environment-path> + </store> + </dev-only> + </virtualhost> + </virtualhosts> + <heartbeat> + <delay>0</delay> + <timeoutFactor>2.0</timeoutFactor> + </heartbeat> + <queue> + <auto_register>true</auto_register> + </queue> + + <virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml</virtualhosts> +</broker> + + diff --git a/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml b/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml new file mode 100644 index 0000000000..67e0702c41 --- /dev/null +++ b/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> +<work>${QPID_WORK}</work> +<conf>${QPID_HOME}/etc</conf> +<passwordDir>${conf}</passwordDir> +<connector> +<transport>nio</transport> +<port>5672</port> +<socketReceiveBuffer>32768</socketReceiveBuffer> +<socketSendBuffer>32768</socketSendBuffer> +</connector> +<management> +<enabled>false</enabled> +<jmxport>8999</jmxport> +</management> +<advanced> +<filterchain enableExecutorPool="true"/> +<enablePooledAllocator>false</enablePooledAllocator> +<enableDirectBuffers>false</enableDirectBuffers> +<framesize>65535</framesize> +<compressBufferOnQueue>false</compressBufferOnQueue> +</advanced> +<security> +<principal-databases> +<principal-database> +<name>passwordfile</name> +<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> +<attributes> +<attribute> +<name>passwordFile</name> +<value>${passwordDir}/passwd</value> +</attribute> +</attributes> +</principal-database> +</principal-databases> +<access> +<class>org.apache.qpid.server.security.access.plugins.AllowAll</class> +</access> +<jmx> +<access>${passwordDir}/jmxremote.access</access> +<principal-database>passwordfile</principal-database> +</jmx> +</security> +<virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml +<default>dev-only</default> +<virtualhost> +<name>dev-only</name> +<dev-only> +<store> +<class>org.apache.qpid.server.store.MemoryMessageStore</class> +<environment-path>${work}/bdbstore/dev-only-store</environment-path> +</store> +<queues> +<exchange>amq.direct</exchange> +<maximumQueueDepth>102400</maximumQueueDepth> +<maximumMessageSize>20480</maximumMessageSize> +<maximumMessageAge>60000</maximumMessageAge> +<queue> +<name>dev-queue</name> +</queue> +</queues> +</dev-only> +</virtualhost> +</virtualhosts> +<heartbeat> +<delay>0</delay> +<timeoutFactor>2.0</timeoutFactor> +</heartbeat> +<queue> +<auto_register>true</auto_register> +</queue> +</configuration> diff --git a/java/systests/etc/config-systests-acl-settings.xml b/java/systests/etc/config-systests-acl-settings.xml new file mode 100644 index 0000000000..c5374a5c5e --- /dev/null +++ b/java/systests/etc/config-systests-acl-settings.xml @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<broker> + + <virtualhosts> + + <virtualhost> + <name>test</name> + <test> + <queues> + <exchange>amq.direct</exchange> + <!-- 4Mb --> + <maximumQueueDepth>4235264</maximumQueueDepth> + <!-- 2Mb --> + <maximumMessageSize>2117632</maximumMessageSize> + <!-- 10 mins --> + <maximumMessageAge>600000</maximumMessageAge> + </queues> + + + <security> + <access> + <class>org.apache.qpid.server.security.access.plugins.SimpleXML</class> + </access> + <access_control_list> + <!-- This section grants pubish rights to an exchange + routing key pair --> + <publish> + <exchanges> + <exchange> + <name>amq.direct</name> + <routing_keys> + + <!-- Allow clients to publish requests --> + <routing_key> + <value>example.RequestQueue</value> + <users> + <user>client</user> + </users> + </routing_key> + + <!-- Allow the processor to respond to a client on their Temporary Topic --> + <routing_key> + <value>tmp_*</value> + <users> + <user>server</user> + </users> + </routing_key> + <routing_key> + <value>TempQueue*</value> + <users> + <user>server</user> + </users> + </routing_key> + </routing_keys> + + </exchange> + </exchanges> + </publish> + + <!-- This section grants users the ability to consume from the broker --> + <consume> + <queues> + + <!-- Allow the clients to consume from their temporary queues--> + <queue> + <temporary/> + <users> + <user>client</user> + </users> + </queue> + + + <!-- Only allow the server to consume from the Request Queue--> + <queue> + <name>example.RequestQueue</name> + <users> + <user>server</user> + </users> + </queue> + + + </queues> + </consume> + + <!-- This section grants clients the ability to create queues and exchanges --> + <create> + <queues> + <!-- Allow clients to create temporary queues--> + <queue> + <temporary/> + <exchanges> + <exchange> + <name>amq.direct</name> + <users> + <user>client</user> + </users> + </exchange> + </exchanges> + </queue> + <!-- Allow the server to create the Request Queue--> + <queue> + <name>example.RequestQueue</name> + <users> + <user>server</user> + </users> + </queue> + + </queues> + </create> + + + </access_control_list> + + </security> + </test> + </virtualhost> + </virtualhosts> +</broker> + + diff --git a/java/systests/etc/config-systests-acl.xml b/java/systests/etc/config-systests-acl.xml new file mode 100644 index 0000000000..5f13c06442 --- /dev/null +++ b/java/systests/etc/config-systests-acl.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${QPID_HOME}/etc/config-systests-acl-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/java/systests/etc/config-systests-derby-settings.xml b/java/systests/etc/config-systests-derby-settings.xml new file mode 100644 index 0000000000..9c25b5682e --- /dev/null +++ b/java/systests/etc/config-systests-derby-settings.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<broker> + <virtualhosts> + <directory>${conf}/virtualhosts</directory> + + <virtualhost> + <name>localhost</name> + <localhost> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${work}/derbyDB/localhost-store</environment-path> + </store> + + <housekeeping> + <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod> + </housekeeping> + + </localhost> + </virtualhost> + + <virtualhost> + <name>development</name> + <development> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${work}/derbyDB/development-store</environment-path> + </store> + </development> + </virtualhost> + + <virtualhost> + <name>test</name> + <test> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${work}/derbyDB/test-store</environment-path> + </store> + </test> + </virtualhost> + + </virtualhosts> +</broker> + + diff --git a/java/systests/etc/config-systests-derby.xml b/java/systests/etc/config-systests-derby.xml new file mode 100644 index 0000000000..d435e85465 --- /dev/null +++ b/java/systests/etc/config-systests-derby.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${QPID_HOME}/etc/config-systests-derby-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/java/systests/etc/config-systests-settings.xml b/java/systests/etc/config-systests-settings.xml new file mode 100644 index 0000000000..4e9c863fda --- /dev/null +++ b/java/systests/etc/config-systests-settings.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<broker> + <management> + <enabled>false</enabled> + <ssl> + <enabled>false</enabled> + </ssl> + </management> +</broker> diff --git a/java/systests/etc/config-systests.xml b/java/systests/etc/config-systests.xml new file mode 100644 index 0000000000..290c082a4f --- /dev/null +++ b/java/systests/etc/config-systests.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" config-optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml b/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml new file mode 100644 index 0000000000..168aa074da --- /dev/null +++ b/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<virtualhosts> + <default>dev-only</default> + <virtualhost> + <name>dev-only</name> + <dev-only> + <queues> + <exchange>amq.direct</exchange> + <!-- Small defaults for development --> + <maximumQueueDepth>102400</maximumQueueDepth> <!-- 100k --> + <maximumMessageSize>20480</maximumMessageSize> <!-- 20kb --> + <maximumMessageAge>60000</maximumMessageAge> <!-- 1 mins --> + + <queue> + <name>dev-queue</name> + </queue> + </queues> + </dev-only> + </virtualhost> +</virtualhosts> |
