You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ai...@apache.org on 2009/05/26 16:41:06 UTC

svn commit: r778723 - in /qpid/trunk/qpid/java: broker/etc/config-systests.xml broker/etc/virtualhosts-systests.xml default.testprofile java.testprofile systests/src/main/java/org/apache/qpid/server/AlertingTest.java

Author: aidan
Date: Tue May 26 14:41:05 2009
New Revision: 778723

URL: http://svn.apache.org/viewvc?rev=778723&view=rev
Log:
Don't delete derby.log. Use virtualhost-systests.xml for testing purpouses. Minor code cleanup in AlertingTest.

Added:
    qpid/trunk/qpid/java/broker/etc/virtualhosts-systests.xml
Modified:
    qpid/trunk/qpid/java/broker/etc/config-systests.xml
    qpid/trunk/qpid/java/default.testprofile
    qpid/trunk/qpid/java/java.testprofile
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java

Modified: qpid/trunk/qpid/java/broker/etc/config-systests.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/etc/config-systests.xml?rev=778723&r1=778722&r2=778723&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/etc/config-systests.xml (original)
+++ qpid/trunk/qpid/java/broker/etc/config-systests.xml Tue May 26 14:41:05 2009
@@ -132,7 +132,7 @@
         <auto_register>true</auto_register>
     </queue>
 
-    <virtualhosts>${conf}/virtualhosts.xml</virtualhosts>
+    <virtualhosts>${conf}/virtualhosts-systests.xml</virtualhosts>
 </broker>
 
 

Added: qpid/trunk/qpid/java/broker/etc/virtualhosts-systests.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/etc/virtualhosts-systests.xml?rev=778723&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/etc/virtualhosts-systests.xml (added)
+++ qpid/trunk/qpid/java/broker/etc/virtualhosts-systests.xml Tue May 26 14:41:05 2009
@@ -0,0 +1,124 @@
+<?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>test</default>
+    <virtualhost>
+        <name>localhost</name>
+        <localhost>            
+            <exchanges>
+                <exchange>
+                    <type>direct</type>
+                    <name>test.direct</name>
+                    <durable>true</durable>
+                </exchange>
+                <exchange>
+                    <type>topic</type>
+                    <name>test.topic</name>
+                </exchange>
+            </exchanges>
+            <queues>
+                <exchange>amq.direct</exchange>
+                <maximumQueueDepth>4235264</maximumQueueDepth>  <!-- 4Mb -->
+                <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
+                <maximumMessageAge>600000</maximumMessageAge>  <!-- 10 mins -->
+                <maximumMessageCount>50</maximumMessageCount> <!-- 50 messages -->
+
+                <queue>
+                    <name>queue</name>
+                </queue>
+                <queue>
+                    <name>ping</name>
+                </queue>
+                <queue>
+                    <name>test-queue</name>
+                    <test-queue>
+                        <exchange>test.direct</exchange>
+                        <durable>true</durable>
+                    </test-queue>
+                </queue>
+                <queue>
+                    <name>test-ping</name>
+                    <test-ping>
+                        <exchange>test.direct</exchange>
+                    </test-ping>
+                </queue>
+
+            </queues>
+        </localhost>
+    </virtualhost>
+
+
+    <virtualhost>
+        <name>development</name>
+        <development>
+            <queues>
+                <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
+                <maximumMessageCount>50</maximumMessageCount>
+                <queue>
+                    <name>queue</name>
+                    <queue>
+                        <exchange>amq.direct</exchange>
+                        <maximumQueueDepth>4235264</maximumQueueDepth>  <!-- 4Mb -->
+                        <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
+                        <maximumMessageAge>600000</maximumMessageAge>  <!-- 10 mins -->
+                    </queue>
+                </queue>
+                <queue>
+                    <name>ping</name>
+                    <ping>
+                        <exchange>amq.direct</exchange>
+                        <maximumQueueDepth>4235264</maximumQueueDepth>  <!-- 4Mb -->
+                        <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
+                        <maximumMessageAge>600000</maximumMessageAge>  <!-- 10 mins -->
+                    </ping>
+                </queue>
+            </queues>
+        </development>
+    </virtualhost>
+        <virtualhost>
+            <name>test</name>
+            <test>                
+                <queues>
+                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
+                    <maximumMessageCount>50</maximumMessageCount>
+                    <queue>
+                        <name>queue</name>
+                        <queue>
+                            <exchange>amq.direct</exchange>
+                            <maximumQueueDepth>4235264</maximumQueueDepth>  <!-- 4Mb -->
+                            <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
+                            <maximumMessageAge>600000</maximumMessageAge>  <!-- 10 mins -->
+                        </queue>
+                    </queue>
+                    <queue>
+                        <name>ping</name>
+                        <ping>
+                            <exchange>amq.direct</exchange>
+                            <maximumQueueDepth>4235264</maximumQueueDepth>  <!-- 4Mb -->
+                            <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
+                            <maximumMessageAge>600000</maximumMessageAge>  <!-- 10 mins -->
+                        </ping>
+                    </queue>
+                </queues>
+            </test>
+    </virtualhost>
+</virtualhosts>

Modified: qpid/trunk/qpid/java/default.testprofile
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/default.testprofile?rev=778723&r1=778722&r2=778723&view=diff
==============================================================================
--- qpid/trunk/qpid/java/default.testprofile (original)
+++ qpid/trunk/qpid/java/default.testprofile Tue May 26 14:41:05 2009
@@ -1,6 +1,6 @@
 broker.version=0-8
 broker=vm
-broker.clean=${project.root}/clean-dir ${build.data} ${project.root}/derbyDB ${project.root}/derby.log
+broker.clean=${project.root}/clean-dir ${build.data} ${project.root}/derbyDB 
 broker.ready=Listening on TCP port
 
 java.naming.provider.url=${project.root}/test-provider.properties

Modified: qpid/trunk/qpid/java/java.testprofile
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/java.testprofile?rev=778723&r1=778722&r2=778723&view=diff
==============================================================================
--- qpid/trunk/qpid/java/java.testprofile (original)
+++ qpid/trunk/qpid/java/java.testprofile Tue May 26 14:41:05 2009
@@ -1,6 +1,6 @@
 broker.language=java
 broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l ${project.root}/log4j-test.xml
-broker.clean=${project.root}/clean-dir ${build.data} ${project.root}/derbyDB ${project.root}/derby.log
+broker.clean=${project.root}/clean-dir ${build.data} ${project.root}/derbyDB 
 broker.ready=Qpid Broker Ready
 
 test.excludesfile=${project.root}/ExcludeList ${project.root}/XAExcludeList ${project.root}/08ExcludeList-nonvm

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java?rev=778723&r1=778722&r2=778723&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AlertingTest.java Tue May 26 14:41:05 2009
@@ -55,16 +55,21 @@
         _configuration = new XMLConfiguration(_configFile); 
         _configuration.setProperty("management.enabled", "false");
         Class storeClass = DerbyMessageStore.class;
+        Class bdb = null;
         try {
-            Class bdb = Class.forName("org.apache.qpid.store.berkleydb.BDBMessageStore");
+            bdb = Class.forName("org.apache.qpid.store.berkleydb.BDBMessageStore");
         }
         catch (ClassNotFoundException e)
         {
             // No BDB store, we'll use Derby instead. 
         }
+        if (bdb != null)
+        {
+            storeClass = bdb;
+        }
         
         _configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".store.class", storeClass.getName());
-        _numMessages = 5000;
+        _numMessages = 50;
         
         File tmpFile = File.createTempFile("configFile", "test");
         tmpFile.deleteOnExit();
@@ -105,14 +110,12 @@
         // just in case the logfile takes a while to flush. 
         BufferedReader reader = new BufferedReader(new FileReader(_logfile));
         boolean found = false;
-        int lineCount = 0;
         long endtime = System.currentTimeMillis()+5000; 
         while (!found && System.currentTimeMillis() < endtime)
         {
             while (reader.ready())
             {
                 String line = reader.readLine();
-                lineCount++;
                 if (line.contains("MESSAGE_COUNT_ALERT"))
                 {
                     found = true;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org