qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1064086 - in /qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/client/ systests/src/main/java/org/apache/qpid/server/logging/ test-profiles/
Date Thu, 27 Jan 2011 11:19:20 GMT
Author: robbie
Date: Thu Jan 27 11:19:19 2011
New Revision: 1064086

URL: http://svn.apache.org/viewvc?rev=1064086&view=rev
Log:
QPID-3022: enable the logging tests and fix issues causing failures due to minor differences
between 0-10 and 0-9 behaviour

Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
    qpid/trunk/qpid/java/test-profiles/Java010Excludes

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Thu Jan 27 11:19:19 2011
@@ -709,6 +709,20 @@ public class AMQSession_0_10 extends AMQ
     }
 
     /**
+     * deletes an exchange 
+     */
+    public void sendExchangeDelete(final String name, final boolean nowait)
+                throws AMQException, FailoverException
+    {
+        getQpidSession().exchangeDelete(name);
+        // We need to sync so that we get notify of an error.
+        if (!nowait)
+        {
+            sync();
+        }
+    }
+
+    /**
      * Declare a queue with the given queueName
      */
     public void sendQueueDeclare(final AMQDestination amqd, final AMQProtocolHandler protocolHandler,

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
Thu Jan 27 11:19:19 2011
@@ -132,6 +132,7 @@ public class AlertingTest extends Abstra
     {
         sendMessage(_session, _destination, _numMessages + 1);
         _session.commit();
+        _connection.close();
         stopBroker();
 
         // Rest the monitoring clearing the current output file.

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
Thu Jan 27 11:19:19 2011
@@ -191,6 +191,16 @@ public class BindingLoggingTest extends 
         // and so unbind.
         _session.createConsumer(_session.createTemporaryQueue()).close();
 
+        if(isBroker010())
+        {
+            //auto-delete is at session close for 0-10
+            _session.close();
+        }
+
+        //wait for the deletion messages to be logged
+        waitForMessage("BND-1002");
+
+        //gather all the BND messages
         List<String> results = waitAndFindMatches(BND_PREFIX);
 
         // We will have two binds as we bind all queues to the default exchange

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
Thu Jan 27 11:19:19 2011
@@ -21,6 +21,7 @@
 package org.apache.qpid.server.logging;
 
 import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQSession_0_10;
 import org.apache.qpid.framing.AMQFrame;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.ExchangeDeleteBody;
@@ -65,7 +66,7 @@ public class ExchangeLoggingTest extends
         _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
         _type = "direct";
-        _name = "testName";
+        _name = getTestQueueName()+ "-exchange";
 
         _queue = _session.createQueue(_type + "://" + _name + "/queue/queue");
 
@@ -177,15 +178,24 @@ public class ExchangeLoggingTest extends
         //Ignore broker startup messages
         _monitor.reset();
 
+        //create the exchange by creating a consumer
         _session.createConsumer(_queue);
 
-        MethodRegistry_8_0 registry = new MethodRegistry_8_0();
+        //now delete the exchange
+        if(isBroker010())
+        {
+            ((AMQSession_0_10) _session).sendExchangeDelete(_name, false);
+        }
+        else
+        {
+            MethodRegistry_8_0 registry = new MethodRegistry_8_0();
 
-        ExchangeDeleteBody body = registry.createExchangeDeleteBody(0, new AMQShortString(_name),
false, true);
+            ExchangeDeleteBody body = registry.createExchangeDeleteBody(0, new AMQShortString(_name),
false, true);
 
-        AMQFrame exchangeDeclare = body.generateFrame(0);
+            AMQFrame exchangeDeclare = body.generateFrame(0);
 
-        ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare, ExchangeDeleteOkBody.class);
+            ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare,
ExchangeDeleteOkBody.class);
+        }
 
         //Wait and ensure we get our last EXH-1002 msg
         waitForMessage("EXH-1002");

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
Thu Jan 27 11:19:19 2011
@@ -147,6 +147,12 @@ public class QueueLoggingTest extends Ab
            // then close the consumer it will be autoDeleted.
            _session.createConsumer(_session.createTemporaryQueue()).close();
 
+           if(isBroker010())
+           {
+               //auto-delete is at session close for 0-10
+               _session.close();
+           }
+           
            // Validation
            //Ensure that we wait for the QUE log message
            waitAndFindMatches("QUE-1002");

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
Thu Jan 27 11:19:19 2011
@@ -181,7 +181,10 @@ public class SubscriptionLoggingTest ext
 
         String message = getMessageString(fromMessage(log));
         assertTrue("Browser not on log message:" + message, message.contains("Browser"));
-        assertTrue("AutoClose not on log message:" + message, message.contains("AutoClose"));
+        if(!isBroker010())
+        {
+            assertTrue("AutoClose not on log message:" + message, message.contains("AutoClose"));
+        }
 
         // Beacause it is an auto close and we have no messages on the queue we
         // will get a close message

Modified: qpid/trunk/qpid/java/test-profiles/Java010Excludes
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/Java010Excludes?rev=1064086&r1=1064085&r2=1064086&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/Java010Excludes (original)
+++ qpid/trunk/qpid/java/test-profiles/Java010Excludes Thu Jan 27 11:19:19 2011
@@ -40,26 +40,10 @@ org.apache.qpid.server.exchange.ReturnUn
 // QPID-1727 , QPID-1726 :c++ broker does not support flow to disk on transient queues. Also
it requries a persistent store impl. for Apache
 org.apache.qpid.test.client.QueueBrowsingFlowToDiskTest#*
 
-// 0-10 Broker does not follow the same Logging convention as the Java broker
-org.apache.qpid.server.logging.AccessControlLoggingTest#*
-org.apache.qpid.server.logging.AlertingTest#*
-org.apache.qpid.server.logging.BindingLoggingTest#*
-org.apache.qpid.server.logging.BrokerLoggingTest#*
+// 0-10 and 0-9 connections dont generate the exact same logging due to protocol differences
 org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartsFlowStopped
 org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted
-org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted
-org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#*
-org.apache.qpid.server.logging.DurableQueueLoggingTest#*
-org.apache.qpid.server.logging.ExchangeLoggingTest#*
-org.apache.qpid.server.logging.ManagementLoggingTest#*
-org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest#*
-org.apache.qpid.server.logging.QueueLoggingTest#*
-org.apache.qpid.server.logging.SubscriptionLoggingTest#*
-org.apache.qpid.server.logging.TransientQueueLoggingTest#*
-org.apache.qpid.server.logging.VirtualHostLoggingTest#*
-org.apache.qpid.server.logging.messages.*
-org.apache.qpid.server.logging.subjects.*
-org.apache.qpid.server.logging.actors.*
+org.apache.qpid.server.logging.SubscriptionLoggingTest#testSubscriptionSuspend
 
 // 0-10 Broker does not have a JMX connection MBean
 org.apache.qpid.management.jmx.ManagementActorLoggingTest#testConnectionCloseViaManagement



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


Mime
View raw message